| Home | Libraries | People | FAQ | More

### Signal set service requirements

A signal set service must meet the requirements for an I/O object service, as well as the additional requirements listed below.

In the table below, `X` denotes a signal set service class, `a` denotes a value of type `X`, `b` denotes a value of type `X::implementation_type`, `ec` denotes a value of type `error_code`, `n` denotes a value of type `int`, and `sh` denotes a value meeting `SignalHandler` requirements.

Table 28. SignalSetService requirements

expression | return type | assertion/note pre/post-condition
--- | --- | ---
`a.construct(b);` |  | From IoObjectService requirements.
`a.destroy(b);` |  | From IoObjectService requirements. Implicitly clears the registered signals as if by calling `a.clear(b, ec)`, then implicitly cancels outstanding asynchronous operations as if by calling `a.cancel(b, ec)`.

    a.add(b, n, ec);

`error_code`

    a.remove(b, n, ec);

`error_code`

    a.clear(b, ec);

`error_code`

    a.cancel(b, ec);

`error_code`

`a.async_wait(b, sh);`

`void`

pre: `a.is_open(b)`.
Initiates an asynchronous operation to wait for the delivery of one of the signals registered for the signal set `b`. The operation is performed via the `io_service` object `a.get_io_service()` and behaves according to asynchronous operation requirements.
If the operation completes successfully, the `SignalHandler` object `sh` is invoked with the number identifying the delivered signal. Otherwise it is invoked with `0`.