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

Execute SerialStream::open within an async runtime #116

Merged
merged 1 commit into from
Jun 22, 2022

Conversation

sirhcel
Copy link
Contributor

@sirhcel sirhcel commented Jun 21, 2022

This function internally uses AsyncFd and this panics when called without an existing runtime. Seen so in the example rtu-client-sync.rs in #107 (with cfg(unix)). Runtime::block_on provides the needed runtime now.

This function internally uses AsyncFd and this panics when called
without an existing runtime. Seen so in the example rtu-client-sync.rs
with cfg(unix). Runtime::block_on provides the needed runtime now.
@uklotzde
Copy link
Member

Thanks for contributing. I agree that it doesn't hurt to use block_on() unconditionally here.

@uklotzde uklotzde merged commit bfa45fe into slowtec:master Jun 22, 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.

None yet

2 participants