Nebula
Loading...
Searching...
No Matches
Fibers::FiberThread Class Reference

#include <fibers.h>

Inherits Thread.

Public Member Functions

 FiberThread ()
 constructor
virtual ~FiberThread ()
 destructor
void EmitWakeupSignal ()
 called if thread needs a wakeup call before stopping
void DoWork ()
 this method runs in the thread context
bool HasWork ()
 returns true if thread has work
void SleepFiber (volatile int *counter, int value)
 sleeps the current fiber and switches it for a new one
void NewFiber ()
 switches the current fiber
void SwitchFiber ()
 switch back to original fiber

Private Member Functions

 __DeclareClass (FiberThread)

Private Attributes

Fibers::FiberContext currentFiber
Fibers::Fiber threadFiber

Constructor & Destructor Documentation

◆ FiberThread()

Fibers::FiberThread::FiberThread ( )

constructor

◆ ~FiberThread()

Fibers::FiberThread::~FiberThread ( )
virtual

destructor

Member Function Documentation

◆ __DeclareClass()

Fibers::FiberThread::__DeclareClass ( FiberThread )
private

◆ DoWork()

void Fibers::FiberThread::DoWork ( )

this method runs in the thread context

◆ EmitWakeupSignal()

void Fibers::FiberThread::EmitWakeupSignal ( )

called if thread needs a wakeup call before stopping

◆ HasWork()

bool Fibers::FiberThread::HasWork ( )

returns true if thread has work

◆ NewFiber()

void Fibers::FiberThread::NewFiber ( )

switches the current fiber

◆ SleepFiber()

void Fibers::FiberThread::SleepFiber ( volatile int * counter,
int value )

sleeps the current fiber and switches it for a new one

◆ SwitchFiber()

void Fibers::FiberThread::SwitchFiber ( )

switch back to original fiber

Member Data Documentation

◆ currentFiber

Fibers::FiberContext Fibers::FiberThread::currentFiber
private

◆ threadFiber

Fibers::Fiber Fibers::FiberThread::threadFiber
private

The documentation for this class was generated from the following files:
  • /github/workspace/code/foundation/fibers/fibers.h
  • /github/workspace/code/foundation/fibers/fibers.cc