Skip to content

Commit 8e5ca0b

Browse files
authored
Document Task(f, n) API (#55184)
Fixes #55005 and helps work around issues discussed in #54998.
1 parent 442f9d5 commit 8e5ca0b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

base/docs/basedocs.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1835,12 +1835,15 @@ Stacktrace:
18351835
DomainError
18361836

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

0 commit comments

Comments
 (0)