File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -1748,6 +1748,12 @@ Create a `Task` (i.e. coroutine) to execute the given function `func` (which
1748
1748
must be callable with no arguments). The task exits when this function returns.
1749
1749
The task will run in the "world age" from the parent at construction when [`schedule`](@ref)d.
1750
1750
1751
+ !!! warning
1752
+ By default tasks will have the sticky bit set to true `t.sticky`. This models the
1753
+ historic default for [`@async`](@ref). Sticky tasks can only be run on the worker thread
1754
+ they are first scheduled on. To obtain the behavior of [`Threads.@spawn`](@ref) set the sticky
1755
+ bit manually to `false`.
1756
+
1751
1757
# Examples
1752
1758
```jldoctest
1753
1759
julia> a() = sum(i for i in 1:1000);
You can’t perform that action at this time.
0 commit comments