Remove loggings

pull/22258/head
Lidi Zheng 5 years ago
parent b2839c2bae
commit efd483311c
  1. 3
      src/python/grpcio/grpc/_cython/_cygrpc/aio/iomgr/socket.pyx.pxi
  2. 15
      src/python/grpcio/grpc/_cython/_cygrpc/aio/poller.pyx.pxi

@ -159,7 +159,6 @@ cdef class _AsyncioSocket:
return self._reader and not self._reader._transport.is_closing()
cdef void close(self):
_LOGGER.debug('closed!')
if self.is_connected():
self._writer.close()
if self._server:
@ -197,9 +196,7 @@ cdef class _AsyncioSocket:
self._new_connection_callback,
sock=self._py_socket,
)
_LOGGER.debug('start listen')
_LOGGER.debug('want to listen')
grpc_aio_loop().create_task(create_asyncio_server())
cdef accept(self,

@ -31,15 +31,6 @@ cdef class BackgroundCompletionQueue:
self._poller.daemon = True
self._poller.start()
# async def _start_poller(self):
# if self._poller:
# raise UsageError('Poller can only be started once.')
# self._poller = threading.Thread(target=self._polling_wrapper)
# self._poller.daemon = True
# self._poller.start()
# await self._poller_running
cdef _polling(self):
cdef grpc_event event
cdef CallbackContext *context
@ -47,28 +38,22 @@ cdef class BackgroundCompletionQueue:
grpc_call_soon_threadsafe(self._poller_running.set_result, None)
while not self._shutdown:
_LOGGER.debug('BackgroundCompletionQueue polling')
with nogil:
event = grpc_completion_queue_next(self._cq,
_GPR_INF_FUTURE,
NULL)
_LOGGER.debug('BackgroundCompletionQueue polling 1')
if event.type == GRPC_QUEUE_TIMEOUT:
_LOGGER.debug('BackgroundCompletionQueue timeout???')
raise NotImplementedError()
elif event.type == GRPC_QUEUE_SHUTDOWN:
_LOGGER.debug('BackgroundCompletionQueue shutdown!')
self._shutdown = True
grpc_call_soon_threadsafe(self._shutdown_completed.set_result, None)
else:
_LOGGER.debug('BackgroundCompletionQueue event! %d', event.success)
context = <CallbackContext *>event.tag
grpc_call_soon_threadsafe(
_handle_callback_wrapper,
<CallbackWrapper>context.callback_wrapper,
event.success)
_LOGGER.debug('BackgroundCompletionQueue polling 2')
def _polling_wrapper(self):
self._polling()

Loading…
Cancel
Save