Async::SignalsSourceAsyncSignalsControllerRegistration

class Registration

Represents an installed set of signal handlers.

Definitions

def initialize(controller, handlers)

Initialize the registration.

Signature

parameter controller Controller

The controller that owns this registration.

parameter handlers Hash(String, Proc | Nil)

The handlers that were installed.

Implementation

def initialize(controller, handlers)
	@controller = controller
	@handlers = handlers
	@context = Context.current
end

attr :context

Signature

attribute Context

The context that installed this registration.

def close

Remove this registration from the controller.

Implementation

def close
	if handlers = @handlers
		@handlers = nil
		@controller.remove(self, handlers)
	end
end