YACLib
C++ library for concurrent tasks execution
Loading...
Searching...
No Matches
yaclib::fault::Scheduler Class Referencefinal

#include <scheduler.hpp>

Public Member Functions

bool IsRunning () const noexcept
 
std::uint64_t GetTimeNs () const noexcept
 
void Schedule (detail::fiber::FiberBase *fiber)
 
void Sleep (std::uint64_t ns)
 
void SleepPreemptive (std::uint64_t ns)
 

Static Public Member Functions

static void SetTickLength (std::uint32_t tick) noexcept
 
static void RescheduleCurrent ()
 
static detail::fiber::FiberBaseCurrent () noexcept
 
static detail::fiber::FiberBase::Id GetId ()
 
static SchedulerGetScheduler () noexcept
 
static void Set (Scheduler *scheduler) noexcept
 
static void Suspend ()
 

Detailed Description

Definition at line 24 of file scheduler.hpp.

Member Function Documentation

◆ Current()

◆ GetId()

◆ GetScheduler()

◆ GetTimeNs()

std::uint64_t yaclib::fault::Scheduler::GetTimeNs ( ) const
noexcept

Definition at line 67 of file scheduler.cpp.

Referenced by yaclib::detail::fiber::SystemClock::now(), and Sleep().

◆ IsRunning()

bool yaclib::fault::Scheduler::IsRunning ( ) const
noexcept

Definition at line 20 of file scheduler.cpp.

◆ RescheduleCurrent()

void yaclib::fault::Scheduler::RescheduleCurrent ( )
static

◆ Schedule()

◆ Set()

void yaclib::fault::Scheduler::Set ( Scheduler scheduler)
staticnoexcept

Definition at line 34 of file scheduler.cpp.

References yaclib::MakeContract(), and yaclib::fault::sCurrentScheduler.

◆ SetTickLength()

void yaclib::fault::Scheduler::SetTickLength ( std::uint32_t  tick)
staticnoexcept

Definition at line 111 of file scheduler.cpp.

References yaclib::MakeContract(), and yaclib::fault::sTickLength.

Referenced by yaclib::fiber::SetFaultTickLength().

◆ Sleep()

void yaclib::fault::Scheduler::Sleep ( std::uint64_t  ns)

Definition at line 115 of file scheduler.cpp.

References GetTimeNs(), yaclib::MakeContract(), yaclib::fault::sCurrent, and Suspend().

Referenced by SleepPreemptive().

◆ SleepPreemptive()

void yaclib::fault::Scheduler::SleepPreemptive ( std::uint64_t  ns)

◆ Suspend()

void yaclib::fault::Scheduler::Suspend ( )
static

The documentation for this class was generated from the following files: