You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/task-spawning.md
+15-15Lines changed: 15 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,21 +32,6 @@ it'll be passed as-is to the function `f` (with some exceptions).
32
32
This default can be controlled by specifying [`Sch.ThunkOptions`](@ref) (more details can be found under [Scheduler and Thunk options](@ref)).
33
33
The section [Changing the thread occupancy](@ref) shows a runnable example of how to achieve this.
34
34
35
-
## Options
36
-
37
-
The [`Options`](@ref Dagger.Options) struct in the second argument position is
38
-
optional; if provided, it is passed to the scheduler to control its
39
-
behavior. [`Options`](@ref Dagger.Options) contains a `NamedTuple` of option
40
-
key-value pairs, which can be any of:
41
-
- Any field in [`Sch.ThunkOptions`](@ref) (see [Scheduler and Thunk options](@ref))
42
-
-`meta::Bool` -- Pass the input [`Chunk`](@ref) objects themselves to `f` and
43
-
not the value contained in them.
44
-
45
-
There are also some extra options that can be passed, although they're considered advanced options to be used only by developers or library authors:
46
-
-`get_result::Bool` -- return the actual result to the scheduler instead of [`Chunk`](@ref) objects. Used when `f` explicitly constructs a [`Chunk`](@ref) or when return value is small (e.g. in case of reduce)
47
-
-`persist::Bool` -- the result of this Thunk should not be released after it becomes unused in the DAG
48
-
-`cache::Bool` -- cache the result of this Thunk such that if the thunk is evaluated again, one can just reuse the cached value. If it’s been removed from cache, recompute the value.
49
-
50
35
## Simple example
51
36
52
37
Let's see a very simple directed acyclic graph (or DAG) constructed with Dagger:
@@ -125,6 +110,21 @@ x::DTask
125
110
126
111
This is useful for nested execution, where an `@spawn`'d thunk calls `@spawn`. This is detailed further in [Dynamic Scheduler Control](@ref).
127
112
113
+
## Options
114
+
115
+
The [`Options`](@ref Dagger.Options) struct in the second argument position is
116
+
optional; if provided, it is passed to the scheduler to control its
117
+
behavior. [`Options`](@ref Dagger.Options) contains a `NamedTuple` of option
118
+
key-value pairs, which can be any of:
119
+
- Any field in [`Sch.ThunkOptions`](@ref) (see [Scheduler and Thunk options](@ref))
120
+
-`meta::Bool` -- Pass the input [`Chunk`](@ref) objects themselves to `f` and
121
+
not the value contained in them.
122
+
123
+
There are also some extra options that can be passed, although they're considered advanced options to be used only by developers or library authors:
124
+
-`get_result::Bool` -- return the actual result to the scheduler instead of [`Chunk`](@ref) objects. Used when `f` explicitly constructs a [`Chunk`](@ref) or when return value is small (e.g. in case of reduce)
125
+
-`persist::Bool` -- the result of this Thunk should not be released after it becomes unused in the DAG
126
+
-`cache::Bool` -- cache the result of this Thunk such that if the thunk is evaluated again, one can just reuse the cached value. If it’s been removed from cache, recompute the value.
127
+
128
128
## Errors
129
129
130
130
If a thunk errors while running under the eager scheduler, it will be marked as
0 commit comments