Skip to content
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

Make EventSubscription and FilterEvents Send-able #471

Merged
merged 4 commits into from Mar 8, 2022

Conversation

jsdw
Copy link
Collaborator

@jsdw jsdw commented Mar 7, 2022

Without this, they cannot be used in tokio::spawn-like contexts, which require things held across await points to impl Send (because they might be moved across threads between such points).

Closes #469

Copy link
Member

@ascjones ascjones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

subxt/src/rpc.rs Outdated
convert::TryInto,
marker::PhantomData,
};
use core::convert::TryInto;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we get rid of this import too now because edition 2021?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Turns out we can :)

@vstakhov
Copy link

vstakhov commented Mar 7, 2022

I can confirm that it works now, thank you!

@lemarier
Copy link
Contributor

lemarier commented Mar 7, 2022

Thank you !

@jsdw jsdw merged commit a091d2b into master Mar 8, 2022
@jsdw jsdw deleted the jsdw-senable-event-sub branch March 8, 2022 10:41
lemarier pushed a commit to tidelabs/subxt that referenced this pull request Mar 9, 2022
* Make EventSubscription and FilterEvents Send-able

* Cargo fmt

* clippy

* Remove unused import
@jsdw jsdw mentioned this pull request Mar 21, 2022
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.

Unable to spawn Events Subscription
5 participants