[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/connectivecpp/wait-queue/main/example/wait_queue_example.cpp [Back]  [Original]

/** @file
 *  
 * @brief Example code demonstrating use of @c chops::wait_queue.
 * See @c threaded_wait_shared_demo.cpp for multithreaded example. 
 * 
 * @author Thurman Gillespy
 * 
 * @copyright (c) 2019 by Thurman Gillespy
 * 3/22/19
 *
 * Minor changes May 2024 by Cliff Green to match new @c wait_queue API.
 *
 * Distributed under the Boost Software License, Version 1.0. 
 * (See accompanying file LICENSE.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 * 
 * Sample make file: 
 * g++ -std=c++17 -I ~/Projects/utility-rack/include/ wait_queue_demo.cpp
 * 
 * This also builds under CMake, with C++ 20 specified.
 */

#include 
#include  // std::boolalpha
#include  // EXIT_SUCCESS
#include 
#include  // std::optional

#include "queue/wait_queue.hpp"

// print queue stats
void queueState(const chops::wait_queue& wq) {
    
    std::cout 

Web Proxy Viewer  |  New URL  |  Original Page