Promise Signals

Signals that return promises when dispatched.

Classes

PromiseSignal

PromiseSignal extends the Signal class to return a new promise for every dispatch call. The promise fulfill and reject methods are given to all signal listeners so that any listener can fulfill or reject the promise.

This is pretty awesome for decoupled systems that talk via signals and commands. With the promises there is now an informal approach for a command to give an answer about the result of the operation.

The code that dispatches the signal (and possibly triggers some other action somewhere in the system) often wants to know if the triggered operation was successful or not.