We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 776aa9e commit c32db49Copy full SHA for c32db49
src/eager_thunk.jl
@@ -55,7 +55,17 @@ function Base.fetch(t::EagerThunk; raw=false)
55
if !isdefined(t, :thunk_ref)
56
throw(ConcurrencyViolationError("Cannot `fetch` an unlaunched `EagerThunk`"))
57
end
58
- return fetch(t.future; raw)
+ stream = task_to_stream(t.uid)
59
+ if stream !== nothing
60
+ add_waiters!(stream, [0])
61
+ end
62
+ try
63
+ return fetch(t.future; raw)
64
+ finally
65
66
+ remove_waiters!(stream, [0])
67
68
69
70
function Base.show(io::IO, t::EagerThunk)
71
status = if isdefined(t, :thunk_ref)
0 commit comments