Public Member Functions | |
def | add_done_callback (self, fn) |
def | cancelled (self) |
def | code (self) |
def | debug_error_string (self) |
def | details (self) |
def | done (self) |
def | exception (self, timeout=None) |
def | initial_metadata (self) |
def | result (self, timeout=None) |
def | running (self) |
def | traceback (self, timeout=None) |
def | trailing_metadata (self) |
![]() | |
def | __del__ (self) |
def | __init__ (self, state, call, response_deserializer, deadline) |
def | __iter__ (self) |
def | __next__ (self) |
def | __repr__ (self) |
def | __str__ (self) |
def | add_callback (self, callback) |
def | cancel (self) |
def | is_active (self) |
def | next (self) |
def | time_remaining (self) |
![]() | |
def | cancel (self) |
Private Member Functions | |
def | _consume_next_event (self) |
def | _is_complete (self) |
def | _next (self) |
def | _next_response (self) |
An RPC iterator operating entirely on a single thread. The __next__ method of _SingleThreadedRendezvous does not depend on the existence of any other thread, including the "channel spin thread". However, this means that its interface is entirely synchronous. So this class cannot completely fulfill the grpc.Future interface. The result, exception, and traceback methods will never block and will instead raise an exception if calling the method would result in blocking. This means that these methods are safe to call from add_done_callback handlers.
Definition at line 455 of file grpc/_channel.py.
|
private |
Definition at line 594 of file grpc/_channel.py.
|
private |
Definition at line 469 of file grpc/_channel.py.
|
private |
Reimplemented from grpc._channel._Rendezvous.
Definition at line 619 of file grpc/_channel.py.
|
private |
Definition at line 605 of file grpc/_channel.py.
def grpc._channel._SingleThreadedRendezvous.add_done_callback | ( | self, | |
fn | |||
) |
Adds a function to be called at completion of the computation. The callback will be passed this Future object describing the outcome of the computation. Callbacks will be invoked after the future is terminated, whether successfully or not. If the computation has already completed, the callback will be called immediately. Exceptions raised in the callback will be logged at ERROR level, but will not terminate any threads of execution. Args: fn: A callable taking this Future object as its single parameter.
Reimplemented from grpc.Future.
Definition at line 553 of file grpc/_channel.py.
def grpc._channel._SingleThreadedRendezvous.cancelled | ( | self | ) |
Describes whether the computation was cancelled. This method does not block. Returns: bool: Returns True if the computation was cancelled before its result became available. Returns False under all other circumstances, for example: 1. computation was not cancelled. 2. computation's result is available.
Reimplemented from grpc.Future.
Definition at line 472 of file grpc/_channel.py.
def grpc._channel._SingleThreadedRendezvous.code | ( | self | ) |
def grpc._channel._SingleThreadedRendezvous.debug_error_string | ( | self | ) |
Reimplemented from grpc._channel._Rendezvous.
Definition at line 644 of file grpc/_channel.py.
def grpc._channel._SingleThreadedRendezvous.details | ( | self | ) |
See grpc.Call.details
Reimplemented from grpc.Call.
Definition at line 586 of file grpc/_channel.py.
def grpc._channel._SingleThreadedRendezvous.done | ( | self | ) |
Describes whether the computation has taken place. This method does not block. Returns: bool: Returns True if the computation already executed or was cancelled. Returns False if the computation is scheduled for execution or currently executing. This is exactly opposite of the running() method's result.
Reimplemented from grpc.Future.
Definition at line 480 of file grpc/_channel.py.
def grpc._channel._SingleThreadedRendezvous.exception | ( | self, | |
timeout = None |
|||
) |
Return the exception raised by the computation. This method will never block. Instead, it will raise an exception if calling this method would otherwise result in blocking. Since this method will never block, any `timeout` argument passed will be ignored.
Reimplemented from grpc.Future.
Definition at line 506 of file grpc/_channel.py.
def grpc._channel._SingleThreadedRendezvous.initial_metadata | ( | self | ) |
See grpc.Call.initial_metadata
Reimplemented from grpc.Call.
Definition at line 561 of file grpc/_channel.py.
def grpc._channel._SingleThreadedRendezvous.result | ( | self, | |
timeout = None |
|||
) |
Returns the result of the computation or raises its exception. This method will never block. Instead, it will raise an exception if calling this method would otherwise result in blocking. Since this method will never block, any `timeout` argument passed will be ignored.
Reimplemented from grpc.Future.
Definition at line 484 of file grpc/_channel.py.
def grpc._channel._SingleThreadedRendezvous.running | ( | self | ) |
Describes whether the computation is taking place. This method does not block. Returns: Returns True if the computation is scheduled for execution or currently executing. Returns False if the computation already executed or was cancelled.
Reimplemented from grpc.Future.
Definition at line 476 of file grpc/_channel.py.
def grpc._channel._SingleThreadedRendezvous.traceback | ( | self, | |
timeout = None |
|||
) |
Access the traceback of the exception raised by the computation. This method will never block. Instead, it will raise an exception if calling this method would otherwise result in blocking. Since this method will never block, any `timeout` argument passed will be ignored.
Reimplemented from grpc.Future.
Definition at line 528 of file grpc/_channel.py.
def grpc._channel._SingleThreadedRendezvous.trailing_metadata | ( | self | ) |
See grpc.Call.trailing_metadata
Reimplemented from grpc.Call.
Definition at line 570 of file grpc/_channel.py.