TEC
A lightweight C++ library enabling safe, efficient execution in multithreaded and concurrent systems.
Loading...
Searching...
No Matches
tec_signal.hpp File Reference

Defines a thread-safe signal implementation using mutex and condition variable. More...

#include <mutex>
#include <condition_variable>
#include "tec/tec_def.hpp"

Go to the source code of this file.

Classes

class  tec::Signal
 A thread-safe signal mechanism for inter-thread synchronization. More...
 
struct  tec::Signal::OnExit
 Helper struct to signal termination on exit. More...
 

Detailed Description

Defines a thread-safe signal implementation using mutex and condition variable.

Author
The Emacs Cat
Date
2025-09-17
Note
Inspired by https://stackoverflow.com/questions/14920725/waiting-for-an-atomic-bool