| 196 | } |
| 197 | |
| 198 | void 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 | |
| 220 | void CoroutineRunner::run(fl::u32 us) FL_NOEXCEPT { |
| 221 | if (mCount == 0) return; |
no outgoing calls
no test coverage detected