@@ -12,7 +12,7 @@ or `spawn` if it's more convenient:
1212
1313` Dagger.spawn(f, Dagger.Options(options), args...; kwargs...) `
1414
15- When called, it creates an [ ` EagerThunk ` ] ( @ref ) (also known as a "thunk" or
15+ When called, it creates an [ ` DTask ` ] ( @ref ) (also known as a "thunk" or
1616"task") object representing a call to function ` f ` with the arguments ` args ` and
1717keyword arguments ` kwargs ` . If it is called with other thunks as args/kwargs,
1818such as in ` Dagger.@spawn f(Dagger.@spawn g()) ` , then, in this example, the
@@ -22,9 +22,9 @@ waits on `g()` to complete before executing.
2222
2323An important observation to make is that, for each argument to
2424` @spawn ` /` spawn ` , if the argument is the result of another ` @spawn ` /` spawn `
25- call (thus it's an [ ` EagerThunk ` ] ( @ref ) ), the argument will be computed first, and then
25+ call (thus it's an [ ` DTask ` ] ( @ref ) ), the argument will be computed first, and then
2626its result will be passed into the function receiving the argument. If the
27- argument is * not* an [ ` EagerThunk ` ] ( @ref ) (instead, some other type of Julia object),
27+ argument is * not* an [ ` DTask ` ] ( @ref ) (instead, some other type of Julia object),
2828it'll be passed as-is to the function ` f ` (with some exceptions).
2929
3030## Options
@@ -75,7 +75,7 @@ The final result (from `fetch(s)`) is the obvious consequence of the operation:
7575
7676Dagger's ` @spawn ` macro works similarly to ` @async ` and ` Threads.@spawn ` : when
7777called, it wraps the function call specified by the user in an
78- [ ` EagerThunk ` ] ( @ref ) object, and immediately places it onto a running scheduler,
78+ [ ` DTask ` ] ( @ref ) object, and immediately places it onto a running scheduler,
7979to be executed once its dependencies are fulfilled.
8080
8181``` julia
@@ -114,7 +114,7 @@ One can also safely call `@spawn` from another worker (not ID 1), and it will be
114114
115115```
116116x = fetch(Distributed.@spawnat 2 Dagger.@spawn 1+2) # fetches the result of `@spawnat`
117- x::EagerThunk
117+ x::DTask
118118@assert fetch(x) == 3 # fetch the result of `@spawn`
119119```
120120
0 commit comments