Cleanup Plasma Async Callback (#7452)

This commit is contained in:
ijrsvt
2020-03-16 10:12:44 -07:00
committed by GitHub
parent 45ce40e5d4
commit 46953c53b1
2 changed files with 23 additions and 29 deletions
+5 -2
View File
@@ -528,11 +528,14 @@ cdef CRayStatus task_execution_handler(
cdef void async_plasma_callback(CObjectID object_id,
int64_t data_size,
int64_t metadata_size) with gil:
message = [tuple([ObjectID(object_id.Binary()), data_size, metadata_size])]
core_worker = ray.worker.global_worker.core_worker
event_handler = core_worker.get_plasma_event_handler()
if event_handler is not None:
event_handler.process_notifications(message)
obj_id = ObjectID(object_id.Binary())
if data_size > 0 and obj_id:
# This must be asynchronous to allow objects to avoid blocking the IO thread.
event_handler._loop.call_soon_threadsafe(
event_handler._complete_future, obj_id)
cdef CRayStatus check_signals() nogil:
with gil: