MCPcopy Create free account
hub / github.com/FastLED/FastLED / cleanup_background_threads

Function cleanup_background_threads

src/platforms/stub/coroutine_stub.impl.hpp:263–273  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

261}
262
263void cleanup_background_threads() FL_NOEXCEPT {
264 auto& bg = ICoroutineRuntime::instance();
265 bg.requestShutdown();
266 auto& reg = BackgroundThreadRegistry::instance();
267 fl::unique_lock<fl::mutex> lock(reg.mtx) FL_NOEXCEPT;
268 for (auto& t : reg.threads) {
269 if (t.joinable()) t.join();
270 }
271 reg.threads.clear();
272 bg.resetShutdown();
273}
274
275bool is_shutdown_requested() FL_NOEXCEPT {
276 return ICoroutineRuntime::instance().isShutdownRequested();

Callers 1

FL_TEST_FILEFunction · 0.85

Calls 4

requestShutdownMethod · 0.80
joinableMethod · 0.80
resetShutdownMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected