Wait Queue
Loading...
Searching...
No Matches
wait_queue_example.cpp File Reference

Example code demonstrating use of chops::wait_queue. See threaded_wait_shared_demo.cpp for multithreaded example. More...

#include <iostream>
#include <ios>
#include <cstdlib>
#include <string>
#include <optional>
#include "queue/wait_queue.hpp"
Include dependency graph for wait_queue_example.cpp:

Functions

void queueState (const chops::wait_queue< int > &wq)
 
int main ()
 

Variables

constexpr auto printStr = [] (const std::string& s) { std::cout << s << std::endl; }
 
constexpr auto printLn = [] () { std::cout << std::endl; }
 

Detailed Description

Example code demonstrating use of chops::wait_queue. See threaded_wait_shared_demo.cpp for multithreaded example.

Author
Thurman Gillespy

Minor changes May 2024 by Cliff Green to match new 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.