Skip to content

Use async event handler and background processor #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tnull opened this issue Jan 6, 2023 · 0 comments · Fixed by #68
Closed

Use async event handler and background processor #37

tnull opened this issue Jan 6, 2023 · 0 comments · Fixed by #68

Comments

@tnull
Copy link
Collaborator

tnull commented Jan 6, 2023

An async variant of the background processor shipped with 0.0.112 (see lightningdevkit/rust-lightning#1657).

We should switch to this, also requiring us to make the event handler async.

This is kind of straightforward, except for the current implementation of process_pending_events_async holding a RwLockGuard over await boundaries (https://github.com/lightningdevkit/rust-lightning/blob/b79ff71fe7587b03ab0b7fe8b6229eb4bc2d7f08/lightning/src/ln/channelmanager.rs#L5262-L5279), which is not Send and therefore doesn't play with tokio nicely.

We therefore first need to address this upstream, e.g., by introducing a Send lock variant.

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 a pull request may close this issue.

1 participant