From 12b7a8422a2c8feb0f0ecbf039434d319f88b4d2 Mon Sep 17 00:00:00 2001 From: Richard Belleville Date: Tue, 22 Oct 2019 22:48:27 -0700 Subject: [PATCH] Remove wait on segregated_call_states. We are passing asan and msan without it --- .../grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi index 5b39625a02e..c31ca14fc89 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi @@ -260,7 +260,6 @@ cdef void _call( on_success(started_tags) else: raise ValueError('Cannot invoke RPC: %s' % channel_state.closed_reason) - cdef void _process_integrated_call_tag( _ChannelState state, _BatchOperationTag tag) except *: cdef _CallState call_state = state.integrated_call_states.pop(tag) @@ -353,10 +352,6 @@ cdef SegregatedCall _segregated_call( def on_success(started_tags): state.segregated_call_states.add(call_state) - # TODO: It doesn't seem necessary to acquire this lock. We're holding the GIL - # and we're only doing a read. In fact, there appears to be a race right now - # because we don't act on the read until later in the function when we're not - # holding the lock. with state.condition: if state.open: c_completion_queue = (grpc_completion_queue_create_for_next(NULL)) @@ -425,12 +420,6 @@ cdef _close(Channel channel, grpc_status_code code, object details, else: while state.integrated_call_states: state.condition.wait() - # This is not valid when we're truly single-threaded because there's no - # thread left to dequeue them. - # Why is unary-unary not currently running into this problem? - # TODO: Figure this out. - # while state.segregated_call_states: - # state.condition.wait() while state.connectivity_due: state.condition.wait()