phasync
StringBuffer / getDeadmanSwitch

Method

StringBuffer::getDeadmanSwitch

Get a deadman switch for this object.

Description#

public StringBuffer::getDeadmanSwitch(): DeadmanSwitch

When the returned DeadmanSwitch is garbage collected (e.g., when the owning coroutine exits), the deadmanSwitchTriggered() method will be called.

Returns the same instance if called multiple times while the switch is still alive.

Return values#

DeadmanSwitch