@@ -224,7 +224,7 @@ public:
224
224
_promise.set_value ();
225
225
return ;
226
226
}
227
- } while (!__builtin_expect ( need_preempt (), NEED_PREEMPT_EXPECTED ));
227
+ } while (!need_preempt ());
228
228
} catch (...) {
229
229
_promise.set_exception (std::current_exception ());
230
230
return ;
@@ -297,7 +297,7 @@ future<> repeat(AsyncAction action) {
297
297
if (f.get0 () == stop_iteration::yes) {
298
298
return make_ready_future<>();
299
299
}
300
- } while (!__builtin_expect ( need_preempt (), NEED_PREEMPT_EXPECTED ));
300
+ } while (!need_preempt ());
301
301
302
302
auto repeater = std::make_unique<internal::repeater<futurized_action_type>>(stop_iteration::no, std::move (futurized_action));
303
303
auto ret = repeater->get_future ();
@@ -370,7 +370,7 @@ public:
370
370
_promise.set_value (std::make_tuple (std::move (*ret)));
371
371
return ;
372
372
}
373
- } while (!__builtin_expect ( need_preempt (), NEED_PREEMPT_EXPECTED ));
373
+ } while (!need_preempt ());
374
374
} catch (...) {
375
375
_promise.set_exception (std::current_exception ());
376
376
return ;
@@ -427,7 +427,7 @@ repeat_until_value(AsyncAction action) {
427
427
if (optional) {
428
428
return make_ready_future<value_type>(std::move (optional.value ()));
429
429
}
430
- } while (!__builtin_expect ( need_preempt (), NEED_PREEMPT_EXPECTED ));
430
+ } while (!need_preempt ());
431
431
432
432
try {
433
433
auto state = std::make_unique<internal::repeat_until_value_state<futurized_action_type, value_type>>(compat::nullopt, std::move (futurized_action));
@@ -473,7 +473,7 @@ public:
473
473
f.forward_to (std::move (_promise));
474
474
return ;
475
475
}
476
- } while (!__builtin_expect ( need_preempt (), NEED_PREEMPT_EXPECTED ));
476
+ } while (!need_preempt ());
477
477
} catch (...) {
478
478
_promise.set_exception (std::current_exception ());
479
479
return ;
@@ -517,7 +517,7 @@ future<> do_until(StopCondition stop_cond, AsyncAction action) {
517
517
if (f.failed ()) {
518
518
return f;
519
519
}
520
- } while (!__builtin_expect ( need_preempt (), NEED_PREEMPT_EXPECTED ));
520
+ } while (!need_preempt ());
521
521
522
522
auto task = std::make_unique<do_until_state<StopCondition, AsyncAction>>(std::move (stop_cond), std::move (action));
523
523
auto f = task->get_future ();
@@ -570,7 +570,7 @@ future<> do_for_each(Iterator begin, Iterator end, AsyncAction action) {
570
570
if (begin == end) {
571
571
return f;
572
572
}
573
- if (!f.available () || __builtin_expect ( need_preempt (), NEED_PREEMPT_EXPECTED )) {
573
+ if (!f.available () || need_preempt ()) {
574
574
return std::move (f).then ([action = std::move (action),
575
575
begin = std::move (begin), end = std::move (end)] () mutable {
576
576
return do_for_each (std::move (begin), std::move (end), std::move (action));
0 commit comments