mergerfs/vendored
Antonio S. Musumeci ea47934c63 Fix idle pool stall when shrinking via _remove_count
_remove_thread_scaling_locked increments _remove_count to signal a
worker to self-exit, but this counter is only checked after a worker
completes a real task.  Workers blocked on wait_dequeue (standard loop)
or try_wait_dequeue_for (autoscale loop) never see the removal request,
so shrinking an idle pool via remove_thread() or set_threads() stalls
indefinitely.

Fix: enqueue a wakeup poison pill alongside each _remove_count
increment so a blocked worker is guaranteed to wake up.

To prevent double-removal (one worker exits via the task-completion CAS
loop consuming _remove_count, another exits via the wakeup pill), the
poison pill handler now attempts to consume a _remove_count before
self-removing.  If the count is already zero (claimed by a worker that
finished a real task), the pill is treated as stale and the worker
continues processing.

Shutdown path is unaffected: the destructor sets _stop before enqueueing
its own pills, and the pill handler checks _stop first, returning BREAK
unconditionally during shutdown regardless of _remove_count.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 12:39:30 -04:00
..
acutest Update vendored/acutest to latest master 2026-03-02 01:09:16 -05:00
boost Update vendored/boost to 1.90.0 2026-03-02 01:09:16 -05:00
CLI11 Update vendored/CLI11 to v2.6.2 2026-03-02 01:09:16 -05:00
fmt Move fmtlib to vendored and upgrade to 12.1.0 2026-03-02 01:09:16 -05:00
khash Move 3rd party libraries to "vendored" directory 2026-03-02 01:09:16 -05:00
libfuse Fix idle pool stall when shrinking via _remove_count 2026-04-10 12:39:30 -04:00
nonstd Update vendored/nonstd to latest and fix API usage 2026-03-02 01:09:16 -05:00
rapidhash Update vendored/rapidhash to v3 2026-03-02 01:09:16 -05:00
scope_guard Move scope_guard to vendored/ 2026-03-24 21:13:34 -04:00
subprocess Update vendored/subprocess to v2.5 2026-03-02 01:09:16 -05:00