StormByte 3.0.0
C++26 foundation of the StormByte suite
Loading...
Searching...
No Matches
thread.hxx File Reference
#include <StormByte/exception.hxx>
#include <StormByte/safe/function.hxx>
#include <StormByte/safe/heap.hxx>
#include <StormByte/visibility.h>
#include <chrono>
#include <cstdint>
#include <functional>
#include <tuple>
#include <type_traits>
#include <utility>
Include dependency graph for thread.hxx:

Go to the source code of this file.

Classes

struct  StormByte::Safe::Detail::IsVoidFunction< T >
 Whether T is a void-returning Function. More...
struct  StormByte::Safe::Detail::IsVoidFunction< Function< void(Args...)> >
 A void-returning Function. More...
struct  StormByte::Safe::Detail::ThreadState< Callable, Args >
 Decayed callable and arguments, allocated on Base's heap. More...
struct  StormByte::Safe::Detail::FunctionState< Args >
 Function and its arguments, allocated on Base's heap. More...
class  StormByte::Safe::Thread
 Execution owned by Base. More...
class  StormByte::Safe::Thread::Id
 Identifier of an execution. More...

Namespaces

namespace  StormByte
 Root namespace of the StormByte suite.
namespace  StormByte::Safe
 Owned values that cross a DLL without the caller's CRT.
namespace  StormByte::Safe::this_thread
 Operations on the calling execution.
namespace  StormByte::Safe::Detail
 Private helpers.

Functions

void * StormByte::Safe::Detail::ThreadStart (void(*entry)(void *), void *argument)
 Start a thread whose body lives in Base.
void StormByte::Safe::Detail::ThreadDestroy (void *thread) noexcept
 Destroy a thread from ThreadStart.
bool StormByte::Safe::Detail::ThreadJoinable (void *thread) noexcept
 Whether the thread still owns an execution.
void StormByte::Safe::Detail::ThreadJoin (void *thread)
 Wait until the execution returns.
void StormByte::Safe::Detail::ThreadDetach (void *thread)
 Detach the execution.
std::uint64_t StormByte::Safe::Detail::ThreadId (void *thread) noexcept
 Identifier of the owned execution.
std::uintptr_t StormByte::Safe::Detail::ThreadNative (void *thread) noexcept
 Native handle as an integer.
std::uint64_t StormByte::Safe::Detail::ThreadSelf () noexcept
 Identifier of the calling execution.
unsigned StormByte::Safe::Detail::ThreadHardware () noexcept
 Hint of concurrent executions.
void StormByte::Safe::Detail::ThreadYield () noexcept
 Offer the calling execution.
void StormByte::Safe::Detail::ThreadSleep (std::uint64_t nanoseconds) noexcept
 Sleep the calling execution.
void StormByte::Safe::swap (Thread &left, Thread &right) noexcept
 Exchange two executions.
Thread::Id StormByte::Safe::this_thread::get_id () noexcept
 Identifier of the calling execution.
void StormByte::Safe::this_thread::yield () noexcept
 Offer the calling execution.
template<class Rep, class Period>
STORMBYTE_FORCE_INLINE void StormByte::Safe::this_thread::sleep_for (const std::chrono::duration< Rep, Period > &time) noexcept
 Sleep the calling execution.
template<class Clock, class Duration>
STORMBYTE_FORCE_INLINE void StormByte::Safe::this_thread::sleep_until (const std::chrono::time_point< Clock, Duration > &time) noexcept
 Sleep until a time point.