set_promise_context: Set Promise Context
Description
If called from an appropriate context, creates an event-driven promise that
will resolve asynchronously when the request is complete.
Usage
set_promise_context(x, ctx)
Arguments
- x
a 'recvAio' object returned by request
.
- ctx
the context environment.
Details
The object passed as ‘x’ is returned regardless of whether
the promise context was set successfully or not. If successful,
‘x’ is modified in place with the promise context.