Skip to content

Commit

Permalink
Document Task(f, n) API (#55184)
Browse files Browse the repository at this point in the history
Fixes #55005 and helps work
around issues discussed in
#54998.
  • Loading branch information
MilesCranmer authored Jul 25, 2024
1 parent 442f9d5 commit 8e5ca0b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion base/docs/basedocs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1835,12 +1835,15 @@ Stacktrace:
DomainError

"""
Task(func)
Task(func[, reserved_stack::Int])
Create a `Task` (i.e. coroutine) to execute the given function `func` (which
must be callable with no arguments). The task exits when this function returns.
The task will run in the "world age" from the parent at construction when [`schedule`](@ref)d.
The optional `reserved_stack` argument specifies the size of the stack available
for this task, in bytes. The default, `0`, uses the system-dependent stack size default.
!!! warning
By default tasks will have the sticky bit set to true `t.sticky`. This models the
historic default for [`@async`](@ref). Sticky tasks can only be run on the worker thread
Expand Down

0 comments on commit 8e5ca0b

Please sign in to comment.