#include <round_robin.hpp>
Definition at line 35 of file round_robin.hpp.
◆ round_robin()
boost::fibers::asio::round_robin::round_robin |
( |
boost::asio::io_service & | io_svc | ) |
|
|
inline |
Definition at line 89 of file round_robin.hpp.
89 :
90 io_svc_( io_svc),
91 suspend_timer_( io_svc_) {
92
93
94
95 boost::asio::add_service( io_svc_, new service( io_svc_));
96 }
◆ awakened()
void boost::fibers::asio::round_robin::awakened |
( |
context * | ctx | ) |
|
|
inlinenoexcept |
Definition at line 99 of file round_robin.hpp.
99 {
100 BOOST_ASSERT( nullptr != ctx);
101 ctx->ready_link( rqueue_);
102 }
◆ has_ready_fibers()
bool boost::fibers::asio::round_robin::has_ready_fibers |
( |
| ) |
const |
|
inlinenoexcept |
◆ notify()
void boost::fibers::asio::round_robin::notify |
( |
| ) |
|
|
inlinenoexcept |
Definition at line 156 of file round_robin.hpp.
156 {
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172 suspend_timer_.expires_at( std::chrono::steady_clock::now() );
173 }
◆ pick_next()
context * boost::fibers::asio::round_robin::pick_next |
( |
| ) |
|
|
inlinenoexcept |
Definition at line 104 of file round_robin.hpp.
104 {
106 if ( ! rqueue_.empty() ) {
107
108
109 ctx = & rqueue_.front();
110 rqueue_.pop_front();
111 BOOST_ASSERT( nullptr != ctx);
112 BOOST_ASSERT( context::active() != ctx);
113 }
114 return ctx;
115 }
◆ suspend_until()
void boost::fibers::asio::round_robin::suspend_until |
( |
std::chrono::steady_clock::time_point const & | abs_time | ) |
|
|
inlinenoexcept |
Definition at line 122 of file round_robin.hpp.
122 {
123
124
125
126
127 if ( suspend_timer_.expires_at() != abs_time) {
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145 suspend_timer_.expires_at( abs_time);
146
147
148
149
150 suspend_timer_.async_wait([](boost::system::error_code const&){});
151 }
152 }
The documentation for this class was generated from the following file: