2
0
mirror of https://github.com/boostorg/fiber.git synced 2026-02-15 13:02:29 +00:00

implement condition_variable in terms of condition_variable_any

This commit is contained in:
Oliver Kowalke
2015-12-18 07:38:42 +01:00
parent 550aed7c37
commit 117384d839
2 changed files with 106 additions and 21 deletions

View File

@@ -16,7 +16,7 @@ namespace boost {
namespace fibers {
void
condition_variable::notify_one() noexcept {
condition_variable_any::notify_one() noexcept {
// get one context' from wait-queue
detail::spinlock_lock lk( wait_queue_splk_);
if ( wait_queue_.empty() ) {
@@ -29,7 +29,7 @@ condition_variable::notify_one() noexcept {
}
void
condition_variable::notify_all() noexcept {
condition_variable_any::notify_all() noexcept {
// get all context' from wait-queue
detail::spinlock_lock lk( wait_queue_splk_);
// notify all context'