Refactor Stoppable:

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
This commit is contained in:
Howard Hinnant
2014-10-29 14:23:41 -04:00
committed by Vinnie Falco
parent 68fe1a7c8f
commit eb64a4387d
4 changed files with 481 additions and 31 deletions

View File

@@ -24,6 +24,7 @@
#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>