Dex.UnixSignal

g Dex.Future Dex.Future Dex.UnixSignal Dex.UnixSignal Dex.Future->Dex.UnixSignal Dex.Object Dex.Object Dex.Object->Dex.Future

Subclasses:

None

Methods

Inherited:

Dex.Future (48), Dex.Object (2)

class

new (signum)

get_signum ()

Virtual Methods

None

Fields

None

Class Details

class Dex.UnixSignal
Bases:

Dex.Future

Abstract:

No

Dex.UnixSignal is a Dex.Future that will resolve when a specific unix signal has been received.

Use this when you want to handle a signal from your main loop rather than from a resticted operating signal handler.

On Linux, this uses a signalfd.

classmethod new(signum)
Parameters:

signum (int) – a unix signal number

Returns:

a new Dex.Future

Return type:

Dex.Future

Creates a new Dex.UnixSignal that completes when signum is delivered to the process.

signum must be one of SIGHUP, SIGINT, SIGTERM, SIGUSR1, SIGUSR2, or SIGWINCH.

This API is only supported on UNIX-like systems.

get_signum()
Return type:

int