Skip to content

SyncthingService: Don't wait for runner thread to exit#135

Merged
chenxiaolong merged 1 commit into
masterfrom
anr
May 16, 2026
Merged

SyncthingService: Don't wait for runner thread to exit#135
chenxiaolong merged 1 commit into
masterfrom
anr

Conversation

@chenxiaolong
Copy link
Copy Markdown
Owner

Syncthing sometimes takes upwards of 10 seconds to exit, which can cause Android to show an ANR warning. We don't actually need to wait because even if the shutdown takes a while and the user tries to start up the service again in the meantime, stbridge's global lock will prevent any race conditions. The startup just won't begin until the previous shutdown completes.

Syncthing sometimes takes upwards of 10 seconds to exit, which can cause
Android to show an ANR warning. We don't actually need to wait because
even if the shutdown takes a while and the user tries to start up the
service again in the meantime, stbridge's global lock will prevent any
race conditions. The startup just won't begin until the previous
shutdown completes.

Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
@chenxiaolong chenxiaolong self-assigned this May 16, 2026
chenxiaolong added a commit that referenced this pull request May 16, 2026
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
@chenxiaolong chenxiaolong merged commit c7e9123 into master May 16, 2026
1 check passed
@chenxiaolong chenxiaolong deleted the anr branch May 16, 2026 23:21
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.

1 participant