Skip to content

Commit 2f47217

Browse files
committed
add_thunk: Optimize thunk_ref allocation
1 parent 578d76c commit 2f47217

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sch/dynamic.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ function _add_thunk!(ctx, state, task, tid, (f, args, kwargs, future, ref))
196196
GC.@preserve _args begin
197197
thunk = Thunk(f, _args...; kwargs...)
198198
# Create a `DRef` to `thunk` so that the caller can preserve it
199-
thunk_ref = poolset(thunk)
199+
thunk_ref = poolset(thunk; size=64)
200200
thunk_id = ThunkID(thunk.id, thunk_ref)
201201
state.thunk_dict[thunk.id] = WeakThunk(thunk)
202202
reschedule_inputs!(state, thunk)

0 commit comments

Comments
 (0)