INNER CODE UNIT · Python
RpcPromise
permitio/fastapi_websocket_rpc · fastapi_websocket_rpc/rpc_channel.py:42
class RpcPromise:
"""
Simple Event and id wrapper/proxy
Holds the state of a pending request
"""
def __init__(self, request: RpcRequest):
self._request = request
self._id = request.call_id
# event used to wait for the completion of the request (upon receiving its matching response)
self._event = asyncio.Event()
@property
def request(self):
return self._request
@property
def call_id(self):