@@ -63,16 +63,16 @@ namespace resumef
63
63
64
64
65
65
66
- RF_API awaitable_t <bool >
66
+ RF_API future_t <bool >
67
67
wait () const ;
68
68
template <class _Rep , class _Period >
69
- awaitable_t <bool >
69
+ future_t <bool >
70
70
wait_for (const std::chrono::duration<_Rep, _Period> & dt) const
71
71
{
72
72
return wait_for_ (std::chrono::duration_cast<clock_type::duration>(dt));
73
73
}
74
74
template <class _Clock , class _Duration >
75
- awaitable_t <bool >
75
+ future_t <bool >
76
76
wait_until (const std::chrono::time_point<_Clock, _Duration> & tp) const
77
77
{
78
78
return wait_until_ (std::chrono::time_point_cast<clock_type::duration>(tp));
@@ -83,39 +83,39 @@ namespace resumef
83
83
84
84
85
85
template <class _Iter >
86
- static awaitable_t <intptr_t >
86
+ static future_t <intptr_t >
87
87
wait_any (_Iter begin_, _Iter end_)
88
88
{
89
89
return wait_any_ (make_event_vector (begin_, end_));
90
90
}
91
91
template <class _Cont >
92
- static awaitable_t <intptr_t >
92
+ static future_t <intptr_t >
93
93
wait_any (const _Cont & cnt_)
94
94
{
95
95
return wait_any_ (make_event_vector (std::begin (cnt_), std::end (cnt_)));
96
96
}
97
97
98
98
template <class _Rep , class _Period , class _Iter >
99
- static awaitable_t <intptr_t >
99
+ static future_t <intptr_t >
100
100
wait_any_for (const std::chrono::duration<_Rep, _Period> & dt, _Iter begin_, _Iter end_)
101
101
{
102
102
return wait_any_for_ (std::chrono::duration_cast<clock_type::duration>(dt), make_event_vector (begin_, end_));
103
103
}
104
104
template <class _Rep , class _Period , class _Cont >
105
- static awaitable_t <intptr_t >
105
+ static future_t <intptr_t >
106
106
wait_any_for (const std::chrono::duration<_Rep, _Period> & dt, const _Cont & cnt_)
107
107
{
108
108
return wait_any_for_ (std::chrono::duration_cast<clock_type::duration>(dt), make_event_vector (std::begin (cnt_), std::end (cnt_)));
109
109
}
110
110
111
111
template <class _Clock , class _Duration , class _Iter >
112
- static awaitable_t <intptr_t >
112
+ static future_t <intptr_t >
113
113
wait_any_until (const std::chrono::time_point<_Clock, _Duration> & tp, _Iter begin_, _Iter end_)
114
114
{
115
115
return wait_any_until_ (std::chrono::time_point_cast<clock_type::duration>(tp), make_event_vector (begin_, end_));
116
116
}
117
117
template <class _Clock , class _Duration , class _Cont >
118
- static awaitable_t <intptr_t >
118
+ static future_t <intptr_t >
119
119
wait_any_until (const std::chrono::time_point<_Clock, _Duration> & tp, const _Cont & cnt_)
120
120
{
121
121
return wait_any_until_ (std::chrono::time_point_cast<clock_type::duration>(tp), make_event_vector (std::begin (cnt_), std::end (cnt_)));
@@ -126,47 +126,46 @@ namespace resumef
126
126
127
127
128
128
template <class _Iter >
129
- static awaitable_t <bool >
129
+ static future_t <bool >
130
130
wait_all (_Iter begin_, _Iter end_)
131
131
{
132
132
return wait_all_ (make_event_vector (begin_, end_));
133
133
}
134
134
template <class _Cont >
135
- static awaitable_t <bool >
135
+ static future_t <bool >
136
136
wait_all (const _Cont & cnt_)
137
137
{
138
138
return wait_all (std::begin (cnt_), std::end (cnt_));
139
139
}
140
140
141
141
template <class _Rep , class _Period , class _Iter >
142
- static awaitable_t <bool >
142
+ static future_t <bool >
143
143
wait_all_for (const std::chrono::duration<_Rep, _Period> & dt, _Iter begin_, _Iter end_)
144
144
{
145
145
return wait_all_for_ (std::chrono::duration_cast<clock_type::duration>(dt), make_event_vector (begin_, end_));
146
146
}
147
147
template <class _Rep , class _Period , class _Cont >
148
- static awaitable_t <bool >
148
+ static future_t <bool >
149
149
wait_all_for (const std::chrono::duration<_Rep, _Period> & dt, const _Cont & cnt_)
150
150
{
151
151
return wait_all_for_ (std::chrono::duration_cast<clock_type::duration>(dt), make_event_vector (std::begin (cnt_), std::end (cnt_)));
152
152
}
153
153
154
154
template <class _Clock , class _Duration , class _Iter >
155
- static awaitable_t <bool >
155
+ static future_t <bool >
156
156
wait_all_until (const std::chrono::time_point<_Clock, _Duration> & tp, _Iter begin_, _Iter end_)
157
157
{
158
158
return wait_all_until_ (std::chrono::time_point_cast<clock_type::duration>(tp), make_event_vector (begin_, end_));
159
159
}
160
160
template <class _Clock , class _Duration , class _Cont >
161
- static awaitable_t <bool >
161
+ static future_t <bool >
162
162
wait_all_until (const std::chrono::time_point<_Clock, _Duration> & tp, const _Cont & cnt_)
163
163
{
164
164
return wait_all_until_ (std::chrono::time_point_cast<clock_type::duration>(tp), make_event_vector (std::begin (cnt_), std::end (cnt_)));
165
165
}
166
166
167
167
168
168
169
-
170
169
RF_API event_t (const event_t &) = default;
171
170
RF_API event_t (event_t &&) = default;
172
171
RF_API event_t & operator = (const event_t &) = default ;
@@ -184,27 +183,28 @@ namespace resumef
184
183
return std::move (evts);
185
184
}
186
185
187
- inline awaitable_t <bool > wait_for_ (const clock_type::duration & dt) const
186
+ public:
187
+ inline future_t <bool > wait_for_ (const clock_type::duration & dt) const
188
188
{
189
189
return wait_until_ (clock_type::now () + dt);
190
190
}
191
- RF_API awaitable_t <bool > wait_until_ (const clock_type::time_point & tp) const ;
191
+ RF_API future_t <bool > wait_until_ (const clock_type::time_point & tp) const ;
192
192
193
193
194
- RF_API static awaitable_t <intptr_t > wait_any_ (std::vector<event_impl_ptr> && evts);
195
- inline static awaitable_t <intptr_t > wait_any_for_ (const clock_type::duration & dt, std::vector<event_impl_ptr> && evts)
194
+ RF_API static future_t <intptr_t > wait_any_ (std::vector<event_impl_ptr> && evts);
195
+ inline static future_t <intptr_t > wait_any_for_ (const clock_type::duration & dt, std::vector<event_impl_ptr> && evts)
196
196
{
197
197
return wait_any_until_ (clock_type::now () + dt, std::forward<std::vector<event_impl_ptr>>(evts));
198
198
}
199
- RF_API static awaitable_t <intptr_t > wait_any_until_ (const clock_type::time_point & tp, std::vector<event_impl_ptr> && evts);
199
+ RF_API static future_t <intptr_t > wait_any_until_ (const clock_type::time_point & tp, std::vector<event_impl_ptr> && evts);
200
200
201
201
202
- RF_API static awaitable_t <bool > wait_all_ (std::vector<event_impl_ptr> && evts);
203
- inline static awaitable_t <bool > wait_all_for_ (const clock_type::duration & dt, std::vector<event_impl_ptr> && evts)
202
+ RF_API static future_t <bool > wait_all_ (std::vector<event_impl_ptr> && evts);
203
+ inline static future_t <bool > wait_all_for_ (const clock_type::duration & dt, std::vector<event_impl_ptr> && evts)
204
204
{
205
205
return wait_all_until_ (clock_type::now () + dt, std::forward<std::vector<event_impl_ptr>>(evts));
206
206
}
207
- RF_API static awaitable_t <bool > wait_all_until_ (const clock_type::time_point & tp, std::vector<event_impl_ptr> && evts);
207
+ RF_API static future_t <bool > wait_all_until_ (const clock_type::time_point & tp, std::vector<event_impl_ptr> && evts);
208
208
};
209
209
210
210
}
0 commit comments