Added cleanup to the server thread's join method.
When the Python Interpreter exits, it first attempts to join any outstanding threads. This is problematic if a server is created as a top-level variable or referenced by a reference cycle, as join() will hang. This adds cleanup behavior to the server thread's join().
Showing
- src/python/grpcio/grpc/_common.py 42 additions, 0 deletionssrc/python/grpcio/grpc/_common.py
- src/python/grpcio/grpc/_server.py 20 additions, 11 deletionssrc/python/grpcio/grpc/_server.py
- src/python/grpcio/tests/tests.json 1 addition, 0 deletionssrc/python/grpcio/tests/tests.json
- src/python/grpcio/tests/unit/_rpc_test.py 0 additions, 7 deletionssrc/python/grpcio/tests/unit/_rpc_test.py
- src/python/grpcio/tests/unit/_thread_cleanup_test.py 117 additions, 0 deletionssrc/python/grpcio/tests/unit/_thread_cleanup_test.py
Please register or sign in to comment