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

Feature: thread 'main' panicked without tokio runtime #3

Open
dmgolembiowski opened this issue May 21, 2023 · 1 comment
Open

Feature: thread 'main' panicked without tokio runtime #3

dmgolembiowski opened this issue May 21, 2023 · 1 comment

Comments

@dmgolembiowski
Copy link

TL;DR

If this crate is used by another which either defers initialization on the tokio runtime, or does not use one at all, it panics. It does this during the invocation .spawn_signal_handler() .

Workaround

Spawn a tokio runtime using the tokio::main proc macro or using tokio::runtime::Builder.

@dmgolembiowski dmgolembiowski changed the title Bug: thread 'main' panicked without tokio runtime Feature: thread 'main' panicked without tokio runtime May 21, 2023
@dmgolembiowski
Copy link
Author

Renaming this as a feature request since it operates perfectly within the intended context; otherwise, to use it outside of tokio like in async-std frameworks, this crate can be minimally prohibitive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant