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

No-allocation OS-thread-owning worker pool using caller-provided worker and thread storage. More...

#include <Fibers.h>

Classes

struct  WakeEventDefinition
 

Public Types

using WakeEventOpaque = OpaqueObject<WakeEventDefinition>
 

Public Member Functions

 FiberWorkerPool (const FiberWorkerPool &)=delete
 
FiberWorkerPooloperator= (const FiberWorkerPool &)=delete
 
Result start (FiberScheduler &scheduler, Span< FiberWorker > workerStorage, Span< FiberWorkerThread > threadStorage)
 
Result start (FiberScheduler &scheduler, Span< FiberWorker > workerStorage, Span< FiberWorkerThread > threadStorage, const FiberWorkerPoolOptions &options)
 
Result requestStop ()
 
Result join ()
 
Result shutdown ()
 
bool isRunning () const
 
size_t workerCount () const
 
size_t parkedWorkerCount () const
 Workers currently blocked in the pool wake wait.
 
void wakeDiagnostics (FiberWorkerPoolWakeDiagnostics &outDiagnostics) const
 Returns wake diagnostics for the current or most recently joined run.
 

Friends

struct FiberScheduler
 
struct FiberWorkerThread
 

Detailed Description

No-allocation OS-thread-owning worker pool using caller-provided worker and thread storage.

Member Function Documentation

◆ parkedWorkerCount()

size_t SC::FiberWorkerPool::parkedWorkerCount ( ) const
nodiscard

Workers currently blocked in the pool wake wait.

◆ wakeDiagnostics()

void SC::FiberWorkerPool::wakeDiagnostics ( FiberWorkerPoolWakeDiagnostics & outDiagnostics) const

Returns wake diagnostics for the current or most recently joined run.


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