Flow 3.0.0
Flow project: Full implementation reference.
Classes | Namespaces | Functions
thread_lcl.hpp File Reference
#include <flow/util/util.hpp>
#include <flow/util/string_view.hpp>
#include <flow/util/thread_lcl_ptr.hpp>
#include <flow/log/log.hpp>
#include <boost/thread.hpp>
#include <boost/unordered_map.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/weak_ptr.hpp>
#include <atomic>
#include <string>
#include <utility>
#include <vector>
#include <typeinfo>
#include <type_traits>

Go to the source code of this file.

Classes

class  flow::util::Thread_local_state_registry< Thread_local_state_t >
 Similar to Thread_local_ptr<T> (a perf-upgraded boost::thread_specific_ptr<T>) but allows iteration through all per-thread data (registry) under temp lock. More...
 
struct  flow::util::Thread_local_state_registry< Thread_local_state_t >::Metadata
 General info (as of this writing for logging only) about a given entry (thread/object) in State_per_thread_map. More...
 
struct  flow::util::Thread_local_state_registry< Thread_local_state_t >::Registry_ctl
 The entirety of the cross-thread registry state, in a struct so as to be able to wrap it in a shared_ptr. More...
 
struct  flow::util::Thread_local_state_registry< Thread_local_state_t >::Tl_context
 The actual user Thread_local_state stored per thread as lazily-created in this_thread_state(); plus a small bit of internal book-keeping. More...
 
struct  flow::util::Thread_local_state_registry< Thread_local_state_t >::Tsp_wrapper
 Simply wraps a Thread_local_ptr<Tl_context>/boost::thread_specific_ptr<Tl_context>, adding absolutely no data or algorithms, purely to work-around a combination of (some?) clang versions and (some?) GNU STL impls giving a bogus compile error, when one tries optional<Thread_local_state_registry>. More...
 
class  flow::util::Poll_flag
 A single boolean flag, armed via arm_next_poll() (typically from another thread) and both checked and disarmed – cheaply enough for the hottest of paths – via poll_armed(). More...
 
class  flow::util::Polled_shared_state< Shared_state_t >
 Optional-use companion to Thread_local_state_registry that (together with Poll_flag) enables the Polled_shared_state pattern wherein from some arbitrary thread user causes the extant thread-locally-activated threads opportunistically collaborate on/using locked shared state, with the no-op fast-path being gated by a high-performance Poll_flag being disarmed. More...
 

Namespaces

namespace  flow
 Catch-all namespace for the Flow project: A collection of various production-quality modules written in modern C++17, originally by ygoldfel.
 
namespace  flow::util
 Flow module containing miscellaneous general-use facilities that don't fit into any other Flow module.
 

Functions

template<typename Thread_local_state_t >
std::ostream & flow::util::operator<< (std::ostream &os, const Thread_local_state_registry< Thread_local_state_t > &val)
 Serializes a Thread_local_state_registry to a standard output stream. More...