1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
[/
/ Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com)
/
/ Distributed under the Boost Software License, Version 1.0. (See accompanying
/ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
/]
[section:SignalSetService Signal set service requirements]
A signal set service must meet the requirements for an [link
boost_asio.reference.IoObjectService 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 [link boost_asio.reference.SignalHandler `SignalHandler`]
requirements.
[table SignalSetService requirements
[[expression] [return type] [assertion/note\npre/post-condition]]
[
[`a.construct(b);`]
[]
[
From [link boost_asio.reference.IoObjectService IoObjectService]
requirements.\n
]
]
[
[`a.destroy(b);`]
[]
[
From [link boost_asio.reference.IoObjectService 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)`.\n
\n
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
[link boost_asio.reference.asynchronous_operations asynchronous operation]
requirements.\n
\n
If the operation completes successfully, the `SignalHandler` object
`sh` is invoked with the number identifying the delivered signal. Otherwise
it is invoked with `0`.
]
]
]
[endsect]
|