Skip to content

Commit 66c9c6c

Browse files
authored
add minimal docstrings
1 parent b127c45 commit 66c9c6c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/internals.jl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ end
2424
Base.schedule(t::StableTask) = (schedule(t.t); t)
2525
Base.schedule(t, val; error=false) = (schedule(t.t, val; error); t)
2626

27-
27+
"""
28+
Similar to `Threads.@spawn` but type-stable. Creates a `Task` and schedules it to run on any available thread in the `:default` threadpool.
29+
"""
2830
macro spawn(ex)
2931
letargs = _lift_one_interp!(ex)
3032

@@ -55,6 +57,10 @@ macro spawn(ex)
5557
end
5658
end
5759

60+
"""
61+
Similar to `StableTasks.@spawn` but creates a **sticky** `Task` and schedules it to run on the thread with the given id (`thrdid`).
62+
The task is guaranteed to stay on this thread (it won't migrate to another thread).
63+
"""
5864
macro spawnat(thrdid, ex)
5965
letargs = _lift_one_interp!(ex)
6066

0 commit comments

Comments
 (0)