class DeferredObservableCallback implements ObservableCallbackInterface

internal  
 

Keep one detachable observable callback active across worker rebinding.

Properties

protected ObservableCallbackInterface|null $delegate
protected bool $active

Methods

__construct(DeferredMeter $meter, Closure $callback, array $instruments, bool $batch, WeakReference|null $target)

Create a deferred observable callback.

void
bind(MeterInterface $meter)

Bind this callback to the given worker meter.

void
unbind()

Unbind this callback from its current worker instrument.

void
detach()

Detach this callback permanently.

Details

at line 33
__construct(DeferredMeter $meter, Closure $callback, array $instruments, bool $batch, WeakReference|null $target)

Create a deferred observable callback.

Parameters

DeferredMeter $meter
Closure $callback
array $instruments
bool $batch
WeakReference|null $target

at line 45
void bind(MeterInterface $meter)

Bind this callback to the given worker meter.

Parameters

MeterInterface $meter

Return Value

void

at line 74
void unbind()

Unbind this callback from its current worker instrument.

Return Value

void

at line 83
void detach()

Detach this callback permanently.

Return Value

void