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

Function cancel

tests/timeout_watchdog.h:164–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

162}
163
164inline void cancel() {
165 if (!g_watchdog_active.load()) {
166 return;
167 }
168
169 g_watchdog_active.store(false);
170 g_should_exit.store(true);
171
172 // Wait for watchdog thread to exit
173 if (g_timer_thread != nullptr) {
174 WaitForSingleObject(g_timer_thread, 1000); // 1 second timeout
175 CloseHandle(g_timer_thread);
176 g_timer_thread = nullptr;
177 }
178
179 // Clean up main thread handle
180 if (g_main_thread != nullptr) {
181 CloseHandle(g_main_thread);
182 g_main_thread = nullptr;
183 }
184}
185
186#else // Unix/Linux/macOS
187

Callers 4

mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
fl_mainFunction · 0.85

Calls 2

loadMethod · 0.45
storeMethod · 0.45

Tested by 4

mainFunction · 0.68
mainFunction · 0.68
mainFunction · 0.68
fl_mainFunction · 0.68