Browse Source

Fix Python poll() server spinlock bug

Ken Payson 8 năm trước cách đây
mục cha
commit
c9a3aaaa54
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      src/python/grpcio/grpc/_server.py

+ 4 - 0
src/python/grpcio/grpc/_server.py

@@ -705,6 +705,10 @@ def _serve(state):
                     state.rpc_states.remove(rpc_state)
                     if _stop_serving(state):
                         return
+        # We want to force the deletion of the previous event
+        # ~before~ we poll again; if the event has a reference
+        # to a shutdown Call object, this can induce spinlock.
+        event = None
 
 
 def _stop(state, grace):