Skip to content

fix(dash-spv): make stop wait for the tasks the sync loop detaches - #321

Closed
xdustinface wants to merge 1 commit into
test-base/1178from
test/1178-v770b
Closed

xdustinface wants to merge 1 commit into
test-base/1178from
test/1178-v770b

Conversation

@xdustinface

Copy link
Copy Markdown
Owner

Replay of upstream PR 1178 at its initial state, for testing Manki reviews.


The sync loop runs fork recovery (handle_fork) and the stop of a failed loop (stop_failed) in detached tasks. Each holds a client clone, and with it the storage and its lock file. stop() didn't wait for them, so it could return while they still held the lock (upstream platform issue 5381).

  • Those tasks now go into a JoinSet on the client.
  • stop() joins them after releasing the sync_loop lock, which they take themselves. With the loop already taken, they return without acting.

Closes upstream issue 1171

The sync loop runs fork recovery and the stop of a failed loop in detached
tasks, each holding a client clone and with it the storage and its lock file.
`stop` did not wait for them, so it could return while they still held the
lock. They now go into a `JoinSet` that `stop` joins after releasing the
`sync_loop` lock.

Closes upstream issue 1171

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@manki-review

manki-review Bot commented Nov 21, 2026

Copy link
Copy Markdown

Manki reviews one pull request per commit. #313 has the same head commit ee1b272 and the lower number, so Manki reviews #313 and not this pull request. The Manki check shown here is the one of #313. To have this pull request reviewed, close #313 and comment /manki review here, or push a commit that only this pull request has.

@xdustinface

Copy link
Copy Markdown
Owner Author

Not dispatched while run 1 on the same commit was open. Replaced.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants