Resources | developer.brewmp.com Resources | developer.brewmp.com

Developer

resources

Signals

Signals are notification objects sent within a process or across process boundaries that provide a method of inter-process communication. Typically, the client wants to be notified when a specific server condition changes. Clients (the notified) create signal objects, which represent readiness, and pass them to servers (the notifiers).

The server sets the signal when the specified state occurs. Except for the notification itself, the signal does not deliver any server information to the client. Signals are like hints, an indication that something might be the case. Synchronous function calls, such as a call to get the state of a signal, can return the actual server state.

Signals are asynchronous. The notifying thread does not stop while the notified thread processes the notification. Instead, notifications are queued for the notified thread. Note that using a signal to send multiple notifications does not necessarily result in multiple deliveries of notification to the client. In particular, if a second notification is sent on a signal before the first notification could be processed by the client, the second notification is generally silently ignored.

There are two interfaces involved in OS Services signals:

  • ISignal - exposes methods to associate user data, set the signal, and detach it from the queue (prevent it from being returned to a thread waiting on a queue).
  • ISignalQ - allows signals to be grouped. Signals are associated with a queue on creation, and the queue stores the set of "ready" or set signals.

For more information, see ISignal and ISignalQ in the http://developer.brewmp.com/reference/api-all.