Skip to content

Deprecate interrupt methods and test cancellation by dropping promises - #42

Draft
xyzconstant wants to merge 3 commits into
2140-dev:masterfrom
xyzconstant:ipc-cancellation-support
Draft

xyzconstant wants to merge 3 commits into
2140-dev:masterfrom
xyzconstant:ipc-cancellation-support

Conversation

@xyzconstant

@xyzconstant xyzconstant commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Based on bitcoin/bitcoin#36097.

Modify the interrupt testing flow to just drop a wait promise to cancel an ongoing wait run on the server. Deprecate the interrupt methods as well, as they are no longer needed.

@Sjors

Sjors commented Sep 28, 2026

Copy link
Copy Markdown
Collaborator

#41 was merged, please rebase.

Run `waitTipChanged` and `waitNext` with no timeout on a dedicated server
thread, then drop the promise.

A server thread runs one call at a time, so a follow-up call intented to run
on the same thread only runs once the wait has finished. With no timeout
and no new tip, it can only finish by being cancelled.
Mirror bitcoin/bitcoin#36097. Long-running calls can now be stopped by
dropping their promise, so explicit interrupt methods are no longer
needed.
@xyzconstant
xyzconstant force-pushed the ipc-cancellation-support branch from d1f3778 to 060719e Compare September 28, 2026 15:26
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