cortex 0.0.1
Loading...
Searching...
No Matches
cortex::tiny_fiber::SchedulerStoppingError Class Reference

Exception thrown when the scheduler is stopping. More...

#include <scheduler_stopping_error.hpp>

Inheritance diagram for cortex::tiny_fiber::SchedulerStoppingError:
[legend]
Collaboration diagram for cortex::tiny_fiber::SchedulerStoppingError:
[legend]

Public Member Functions

 SchedulerStoppingError ()
 

Detailed Description

Exception thrown when the scheduler is stopping.

This exception is thrown by Yield(), Mutex::Lock(), and ConditionVariable::Wait() when the scheduler is being destroyed. Fibers should catch this to clean up gracefully.

Example:

try {
while (true) {
tf::Yield();
}
} catch (const tf::SchedulerStoppingError&) {
// Clean up and exit
}
Handle to a spawned fiber that returns a value.
Definition future.hpp:46

Constructor & Destructor Documentation

◆ SchedulerStoppingError()

cortex::tiny_fiber::SchedulerStoppingError::SchedulerStoppingError ( )
inline

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