File tree 1 file changed +6
-3
lines changed
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -300,7 +300,7 @@ function migrate_stream!(stream::Stream, w::Integer=myid())
300
300
301
301
# TODO : Wire up listener to ferry cancel_token notifications to remote
302
302
# worker once migrations occur during runtime
303
- tls = get_tls ()
303
+ tls = poolset ( get_tls () )
304
304
@assert w == myid () " Only pull-based migration is currently supported"
305
305
# remote_cancel_token = clone_cancel_token_remote(get_tls().cancel_token, worker_id)
306
306
@@ -322,8 +322,11 @@ function migrate_stream!(stream::Stream, w::Integer=myid())
322
322
# Initialize the StreamStore on the destination with the unsent inputs/outputs.
323
323
STREAM_THUNK_ID[] = thunk_id
324
324
@assert ! in_task ()
325
- set_tls! (tls)
326
- # get_tls().cancel_token = MemPool.access_ref(identity, remote_cancel_token; local_only=true)
325
+
326
+ # N.B. It's not very valid to share TLS across tasks, but we do this
327
+ # so that input/output tasks have access to TID and cancel token
328
+ set_tls! (copy (MemPool. access_ref (identity, tls; local_only= true )))
329
+
327
330
unsent_inputs, unsent_outputs = unsent
328
331
for (input_uid, inputs) in unsent_inputs
329
332
input_stream = store. input_streams[input_uid]
You can’t perform that action at this time.
0 commit comments