Create the asynchronous version of a secure channel, that accepts the
credentials.
from grpc.experimental.aio import secure_channel
channel = secure_channel(...)
Co-authored-by: Pau Freixes <pau.freixes@skyscanner.net>
Due to the GC work for breaking reference cycles the internal
attributes of the _AioCall object were cleared and initialized
with None in aims of releasing refcounts for breaking direct or
indirect references.
Once the clear was done, the deallocation of the _AioCall would
fail since the pointer to gRPC call was cast to an invalid object,
no longer was a GrcpWrapper object but a None object, returning a
NULL as a value for the attribute call.
Implements TCP Tx-side zerocopy. Must be explicitly enabled to use.
For large RPCs (>= 16KiB) it reduces the amount of CPU time spent
since it avoids a userspace to kernel data buffer copy. However, there
is a tradeoff - the application must process a callback on the socket
error queue placed by the kernel, informing the application that the
data buffer can be freed since the kernel is done. The cost of
processing the error queue means that we do not have an advantage for
small RPCs.
Implements the unary unary interceptor for the client-side. Interceptors
can be now installed by passing them as a new parameter of the `Channel`
constructor or by giving them as part of the `insecure_channel`
function.
Interceptors are executed within an Asyncio task for making some work before
the RPC invocation, and after for accessing to the intercepted call that has
been invoked.