CoroutineState
class CoroutineState implements NonCopyableContext
Keep transfers and their cancellation callbacks within their owning coroutine.
Constants
| protected CONTEXT_KEY |
|
Properties
| TaskQueue | $queue | ||
| protected PromiseInterface> | $promises |
Methods
Create a queue whose lifetime follows its coroutine rather than the process.
Get the current coroutine's state without creating it.
Get the current coroutine's state and register owner-exit cleanup.
Retain pending transport work in its owner's context until it settles.
Cancel unfinished transport work.
Finish cancellation and queued callbacks before reporting cleanup failures.
Details
at line 29
__construct()
Create a queue whose lifetime follows its coroutine rather than the process.
at line 37
static CoroutineState|null
current()
Get the current coroutine's state without creating it.
at line 45
static CoroutineState
forCurrent()
Get the current coroutine's state and register owner-exit cleanup.
at line 63
void
track(PromiseInterface $promise)
Retain pending transport work in its owner's context until it settles.
at line 77
void
cancel()
Cancel unfinished transport work.
at line 88
void
finish()
Finish cancellation and queued callbacks before reporting cleanup failures.