MayaFlux
0.3.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
◆
ServerThread()
[2/4]
Lila::ServerThread::ServerThread
(
Callback
callback
)
inline
explicit
Definition at line
146
of file
ServerThread.hpp
.
147
:
m_stop_flag
(std::make_shared<std::atomic<bool>>(
false
))
148
{
149
// Capture stop_flag by value (shared_ptr) to ensure it outlives the thread
150
// critical: the thread lambda must hold a reference to keep the flag alive
151
auto
stop_flag =
m_stop_flag
;
152
153
m_thread
= std::thread([callback = std::move(callback), stop_flag]() {
154
StopToken token(stop_flag.get());
155
callback(token);
156
});
157
}
Lila::ServerThread::m_stop_flag
std::shared_ptr< std::atomic< bool > > m_stop_flag
Definition
ServerThread.hpp:212
Lila::ServerThread::m_thread
std::thread m_thread
Definition
ServerThread.hpp:211
References
m_stop_flag
, and
m_thread
.
Lila
ServerThread
Generated by
1.9.8