Sane C++ Libraries
C++ Platform Abstraction Libraries
Loading...
Searching...
No Matches
SC::FiberJobScheduler Struct Reference

Single-thread-driven, fixed-capacity scheduler for stackless run-to-completion jobs. More...

#include <Fibers.h>

Public Member Functions

 FiberJobScheduler (const FiberJobScheduler &)=delete
 
FiberJobScheduleroperator= (const FiberJobScheduler &)=delete
 
Result create (Span< FiberJob * > readyStorage)
 
Result close ()
 
Result spawn (FiberJob &job, FiberJob::Procedure procedure)
 
Result spawn (FiberJob &job, FiberJob::Procedure procedure, FiberCancellationToken token)
 
Result runOne (bool &outRanJob)
 
Result run ()
 
Result shutdown ()
 
Result requestCancel (FiberJob &job)
 
Result requestCancel (FiberCancellationTokenSource &tokenSource)
 
Result requestCancelAll ()
 
bool isOpen () const
 
bool hasReadyJobs () const
 
bool hasActiveJobs () const
 
size_t capacity () const
 
size_t readyJobCount () const
 
size_t activeJobCount () const
 
FiberJobcurrentJob ()
 

Detailed Description

Single-thread-driven, fixed-capacity scheduler for stackless run-to-completion jobs.

This first concrete scheduler intentionally does not create worker threads. Calls must not overlap across threads. A later worker-pool topology can build on the same FiberJob state and ownership contract without adding stacks.


The documentation for this struct was generated from the following file: