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

Give access to Subscription's crossbeam channel #162

Merged
merged 3 commits into from
Apr 12, 2021

Conversation

marjakm
Copy link
Contributor

@marjakm marjakm commented Apr 1, 2021

Gives access to the a crossbeam Receiver in the Subscription struct. Useful for crossbeam_channel::select macro. Diff should speak for itself. I didn't find a way to select on multiple Subscriptions in one thread without access to the crossbeam channel. Is there a better way?

Offtopic: I used the async-nats with tokio at first, but I think async_nats::Subsciption::next implementation will lose messages if canceled by tokio::select.

@spacejam
Copy link
Contributor

spacejam commented Apr 8, 2021

I'm OK with merging this once the doctest is fixed. Do you need a hand with fixing the compilation error in the doctest?

@marjakm
Copy link
Contributor Author

marjakm commented Apr 8, 2021

Should be ok now. I haven't used doctests or clippy, so didn't know how to run them.

@spacejam
Copy link
Contributor

LGTM, thank you! I'll cut a release that includes this in a few minutes

@spacejam spacejam merged commit 6d3415e into nats-io:master Apr 12, 2021
@spacejam
Copy link
Contributor

0.9.10 has been published which includes this change

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.

None yet

2 participants