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

Method suspendMainthread

src/platforms/coroutine_runtime.h:54–56  ·  view source on GitHub ↗

Yield the current execution context for approximately `us` microseconds. Safe to call from ANY context (main thread, coroutine thread, worker thread). Used by fl::platforms::await() to yield while polling a promise. Default delegates to pumpCoroutines(). Override on platforms where pumpCoroutines() is not safe from worker threads (e.g. Stub).

Source from the content-addressed store, hash-verified

52 /// Default delegates to pumpCoroutines(). Override on platforms
53 /// where pumpCoroutines() is not safe from worker threads (e.g. Stub).
54 virtual void suspendMainthread(fl::u32 us) FL_NOEXCEPT {
55 pumpCoroutines(us);
56 }
57
58 /// Wake every thread parked in suspendMainthread() early.
59 ///

Callers 1

awaitFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected