mirror of
https://github.com/wassname/ray.git
synced 2026-06-30 13:12:46 +08:00
Re-route asyncio plasma code path through raylet instead of direct plasma connection (#7234)
This commit is contained in:
@@ -16,7 +16,7 @@ async def _async_init():
|
||||
worker = ray.worker.global_worker
|
||||
loop = asyncio.get_event_loop()
|
||||
handler = PlasmaEventHandler(loop, worker)
|
||||
worker.core_worker.subscribe_to_plasma(handler)
|
||||
worker.core_worker.set_plasma_added_callback(handler)
|
||||
logger.debug("AsyncPlasma Connection Created!")
|
||||
|
||||
|
||||
|
||||
@@ -71,6 +71,8 @@ class PlasmaEventHandler:
|
||||
|
||||
future = PlasmaObjectFuture(loop=self._loop)
|
||||
self._waiting_dict[object_id].append(future)
|
||||
self.check_immediately(object_id)
|
||||
|
||||
if not self.check_immediately(object_id) and len(
|
||||
self._waiting_dict[object_id]) == 1:
|
||||
# Only subscribe once
|
||||
self._worker.core_worker.subscribe_to_plasma_object(object_id)
|
||||
return future
|
||||
|
||||
Reference in New Issue
Block a user