mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
The Stoppable interface aids in the enforcement of invariants needed to successful start and stop a multi-threaded application composed of classes that depend on each other in complex ways. * Test written to confirm the current behavior. * Comments updated to reflect the current behavior. * Public API reduced to what is currently in use. * Protected data members made private. * volatile bool members changed to std::atomic<bool>. * std::atomic<int> members changed to std::atomic<bool>. * Name storage uses std::string
32 lines
1.4 KiB
C++
32 lines
1.4 KiB
C++
//------------------------------------------------------------------------------
|
|
/*
|
|
This file is part of Beast: https://github.com/vinniefalco/Beast
|
|
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
purpose with or without fee is hereby granted, provided that the above
|
|
copyright notice and this permission notice appear in all copies.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
*/
|
|
//==============================================================================
|
|
|
|
#if BEAST_INCLUDE_BEASTCONFIG
|
|
#include <BeastConfig.h>
|
|
#endif
|
|
|
|
#include <beast/threads/impl/RecursiveMutex.cpp>
|
|
#include <beast/threads/impl/ServiceQueue.cpp>
|
|
#include <beast/threads/impl/Stoppable.cpp>
|
|
#include <beast/threads/impl/Stoppable.test.cpp>
|
|
#include <beast/threads/impl/Thread.cpp>
|
|
#include <beast/threads/impl/WaitableEvent.cpp>
|
|
|
|
#include <beast/threads/tests/ServiceQueue.cpp>
|