mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-19 16:16:48 +00:00
Implementation: - Add enqueue_task(PToken&, FuncType&&) overload so high-rate callers can use a dedicated producer token without losing the future-based return. Mirrors the no-token version: try-enqueue with fast-path grow on pressure (autoscale pools), block-enqueue otherwise. Tests (5 new, 87 total): - tp_enqueue_task_with_ptoken: basic int/string/void futures via ptok - tp_enqueue_task_ptoken_exception: exception forwarded through future - tp_enqueue_task_ptoken_multiple_futures: 50 concurrent futures, all resolved correctly - tp_construct_scaling_nonpositive_decline_throws: decline_threshold ≤ 0 was the only ScalingConfig validation not covered by an explicit test - tp_autoscale_fast_path_grow_on_pressure: verifies _maybe_grow_on_pressure fires (thread_count grows synchronously) when enqueue_work_autoscale finds the queue full Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>