Release GIL in prepare_actor_checkpoint (#4208)

This commit is contained in:
Hao Chen
2019-03-02 11:43:28 +08:00
committed by Robert Nishihara
parent 6f1a29ad3f
commit 48f6cd3e5d
+6 -2
View File
@@ -354,8 +354,12 @@ cdef class RayletClient:
def prepare_actor_checkpoint(self, ActorID actor_id):
cdef CActorCheckpointID checkpoint_id
check_status(self.client.get().PrepareActorCheckpoint(
actor_id.data, checkpoint_id))
cdef CActorID c_actor_id = actor_id.data
# PrepareActorCheckpoint will wait for raylet's reply, release
# the GIL so other Python threads can run.
with nogil:
check_status(self.client.get().PrepareActorCheckpoint(
c_actor_id, checkpoint_id))
return ActorCheckpointID(checkpoint_id.binary())
def notify_actor_resumed_from_checkpoint(self, ActorID actor_id,