소스 검색

Fix Python poll() server spinlock bug

Ken Payson 8 년 전
부모
커밋
c9a3aaaa54
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  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):