SharedHap.register

SharedRegistration!Handler register(this This)(Handler handler) @safe

Register a delegate handler and return a detachable handle.

Unlike attach, the returned SharedRegistration detaches exactly this handler, even while a dispatch is in flight.

Parameters

handlerDelegate handler to register; null yields an inert handle.

Returns

A SharedRegistration for explicit detach.
SharedRegistration!Handler register(this This)(FunctionHandler handler) @safe

Register a free-function handler and return a detachable handle.

Parameters

handlerFree-function handler to register; null yields an inert handle.

Returns

A SharedRegistration for explicit detach.