mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-11-20 23:16:27 -05:00
start_routine and start_routine_autoscale shared ~30 lines of identical post-dequeue logic: poison-pill detection, exception-guarded execution, func destruction, tasks_completed bookkeeping, and the _tl_should_exit exit protocol. Any bug fix to this logic had to be applied in both places. Extract the shared code into _process_func which returns a WorkerAction enum (CONTINUE / BREAK / EXIT). Both worker loops now call this helper, reducing the maintenance surface and eliminating the duplication. Also document the BoundedQueue::try_enqueue no-move-on-failure contract in enqueue_work_autoscale, since the correctness of the try-then-block pattern depends on it. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| acutest | ||
| boost | ||
| CLI11 | ||
| fmt | ||
| khash | ||
| libfuse | ||
| nonstd | ||
| rapidhash | ||
| scope_guard | ||
| subprocess | ||