mirror of
https://github.com/wassname/ray.git
synced 2026-07-05 05:56:25 +08:00
Register function race (#9346)
This commit is contained in:
@@ -136,9 +136,13 @@ class ImportThread:
|
||||
ray_constants.DUPLICATE_REMOTE_FUNCTION_THRESHOLD)
|
||||
|
||||
if key.startswith(b"RemoteFunction"):
|
||||
with profiling.profile("register_remote_function"):
|
||||
(self.worker.function_actor_manager.
|
||||
fetch_and_register_remote_function(key))
|
||||
# TODO (Alex): There's a race condition here if the worker is
|
||||
# shutdown before the function finished registering (because core
|
||||
# worker's global worker is unset before shutdown and is needed
|
||||
# for profiling).
|
||||
# with profiling.profile("register_remote_function"):
|
||||
(self.worker.function_actor_manager.
|
||||
fetch_and_register_remote_function(key))
|
||||
elif key.startswith(b"FunctionsToRun"):
|
||||
with profiling.profile("fetch_and_run_function"):
|
||||
self.fetch_and_execute_function_to_run(key)
|
||||
|
||||
Reference in New Issue
Block a user