class SharedResolution

internal  
 

Coordinates one cacheable first resolution across coroutines.

Properties

protected Channel $signal
protected bool $settled
protected mixed $value
protected Throwable|null $failure

Methods

__construct(int $ownerId)

No description

void
complete(mixed $value)

Publish the completed resolution and wake every waiter.

void
fail(Throwable $failure)

Publish the resolution failure and wake every waiter.

mixed
await()

Wait for and return the completed resolution.

Details

at line 26
__construct(int $ownerId)

No description

Parameters

int $ownerId

at line 35
void complete(mixed $value)

Publish the completed resolution and wake every waiter.

Parameters

mixed $value

Return Value

void

at line 45
void fail(Throwable $failure)

Publish the resolution failure and wake every waiter.

Parameters

Throwable $failure

Return Value

void

at line 58
mixed await()

Wait for and return the completed resolution.

Return Value

mixed

Exceptions

BindingResolutionException
Throwable