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

Method remove

src/platforms/shared/coroutine_context.cpp.hpp:198–218  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

196}
197
198void CoroutineRunner::remove(CoroutineContext* ctx) FL_NOEXCEPT {
199 for (size_t i = 0; i < mCount; ++i) {
200 if (mQueue[i] == ctx) {
201 // Shift remaining entries down
202 for (size_t j = i; j + 1 < mCount; ++j) {
203 mQueue[j] = mQueue[j + 1];
204 }
205 --mCount;
206 mQueue[mCount] = nullptr;
207
208 // Adjust next index if needed
209 if (mNextIndex > i && mNextIndex > 0) {
210 --mNextIndex;
211 }
212 if (mNextIndex >= mCount && mCount > 0) {
213 mNextIndex = 0;
214 }
215 return;
216 }
217 }
218}
219
220void CoroutineRunner::run(fl::u32 us) FL_NOEXCEPT {
221 if (mCount == 0) return;

Callers 15

TaskCoroutineWasmClass · 0.45
updateRecordButtonUIFunction · 0.45
hideCanvasUIWithDelayFunction · 0.45
app.tsFile · 0.45
hideMethod · 0.45
resetMethod · 0.45
_clearExistingLedsMethod · 0.45
applyLayoutMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected