btu/common/threading.hpp file

Namespaces

namespace btu
namespace btu::common

Classes

template <typename GuardedType, basic_lockable MutexType = std::mutex>
class btu::common::update_guard
template <typename GuardedData, basic_lockable MutexType>
class btu::common::synchronized

Typedefs

using ThreadPool = BS::thread_pool

Functions

template <typename Range, typename Func>
auto for_each_mt(Range&& rng, Func&& func) →  auto
auto hardware_concurrency() →  unsigned noexcept
template <typename Out, typename Range, typename Func>
auto make_producer_mt(Range&& rng, Func&& func) →  auto
Creates a multi-threaded producer for the specified range and function.
auto make_thread_pool()
Creates a thread pool with the number of threads equal to the number of hardware threads minus one.