TimeoutManager.ExpiryRegistration

Expiry registration class for an object that can time out.

class TimeoutManager
class ExpiryRegistration : ExpiryRegistrationBase {}

Constructors

this
this(ITimeoutClient client)

Constructor

Members

Functions

id
cstring id()

Identifier string for debugging.

Inherited Members

From ExpiryRegistrationBase

ITimeoutManagerInternal
interface ITimeoutManagerInternal

Enables access of TimeoutManager internals.

client
ITimeoutClient client;

Timeout client: Object that times out after register() has been called when the time interval passed to register() has expired.

expiry
Expiry* expiry;

Reference to an expiry time item in the registry; this is the key returned from register() and passed to unregister(). The expiry item is null if and only if the client is registered with the timeout manager.

unregister
bool unregister()

Unregisters the current client. If a client is currently not registered, nothing is done.

drop
bool drop()

Same as unregister but also removes expirty from list of currently expired registrations. That means it can be called from timeout callbacks, contrary to unregister.

expires
ulong expires()
us_left
long us_left()
timeout
ITimeoutClient timeout()

Invokes the timeout() method of the client.

timed_out
bool timed_out()
registered
bool registered()
register
bool register(ulong timeout_us)

Sets the timeout for the client and registers it with the timeout manager. On timeout the client will automatically be unregistered. The client must not already be registered.

id
cstring id()

Identifier string for debugging.

Meta