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
{{ message }}
Repository navigation
fix(platform-wallet): keep a stop from waiting on a background shielded sync restart #6448
TL;DR: A request to stop background shielded sync can be delayed while a restart that is already in progress finishes reaping the previous worker.
User story
As a wallet app developer, I want stopping shielded sync to start its own time budget immediately, so app shutdown and account switches stay fast.
Scenario
Base flow
A rebuild or an explicit start restarts background shielded sync while the previous worker is still being reaped. At the same time the app asks to stop sync.
Actual behavior
The restart holds the sync-intent lock for the whole start, including the bounded reap of the old worker. Stop and quiesce take the same lock before their drain timer starts, so they wait for the reap first.
Expected behavior
Stop records its intent without waiting for an in-progress start, and still wins over it.
Detailed discussion
Proposed approach: shorten the critical section of the restart while keeping stop ordering (a stop issued during a start must still prevent the started worker from running). A simple two-check atomic scheme is not enough, because work could begin between the checks.
Activity