1
1
# Remote
2
2
function eager_submit_internal! (@nospecialize (payload))
3
+ Sch. init_eager ()
4
+
3
5
ctx = Dagger. Sch. eager_context ()
4
6
state = Dagger. Sch. EAGER_STATE[]
5
7
task = current_task ()
@@ -10,6 +12,8 @@ function eager_submit_internal!(ctx, state, task, tid, payload; uid_to_tid=Dict{
10
12
@nospecialize payload
11
13
ntasks, uid, future, ref, f, args, options, reschedule = payload
12
14
15
+ Sch. init_eager ()
16
+
13
17
if uid isa Vector
14
18
thunk_ids = Sch. ThunkID[]
15
19
for i in 1 : ntasks
@@ -123,6 +127,7 @@ function eager_submit!(ntasks, uid, future, finalizer_ref, f, args, options)
123
127
elseif myid () != 1
124
128
return remotecall_fetch (eager_submit_internal!, 1 , (ntasks, uid, future, finalizer_ref, f, args, options, true ))
125
129
else
130
+ Sch. init_eager ()
126
131
state = Dagger. Sch. EAGER_STATE[]
127
132
return lock (state. lock) do
128
133
eager_submit_internal! ((ntasks, uid, future, finalizer_ref,
@@ -170,8 +175,6 @@ function eager_process_options_submission_to_local(id_map, options::NamedTuple)
170
175
end
171
176
end
172
177
function eager_spawn (spec:: EagerTaskSpec )
173
- Dagger. Sch. init_eager ()
174
-
175
178
# Generate new EagerThunk
176
179
uid = eager_next_id ()
177
180
future = ThunkFuture ()
0 commit comments