You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove unused Semaphore and fix pending_tasks publish ordering
Delete the unused Semaphore primitive and its test rather than fixing its
multi-waiter wakeup bug, since it is dead code referenced only by its own test.
Increment pending_tasks before publishing the task in Pool::submit and in the
get_task re-enqueue path, so a worker can never dequeue a task before its count
is registered (over-counting is safe; under-counting could transiently underflow).
Reword the ~Scheduler comments to describe the real failure mode: a dangling
current_pool leads to shared_from_this() on a destroyed pool (undefined
behaviour), not a guaranteed bad_weak_ptr throw.
Co-authored-by: Cursor <cursoragent@cursor.com>
0 commit comments