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

Async functions in a shared library panic with "there is no reactor running" #99

Open
zmiiGorinich opened this issue Feb 13, 2025 · 0 comments

Comments

@zmiiGorinich
Copy link

If I create an async function in my dynamically loaded library, stabbify it with
#[stabby::stabby]
#[stabby::export]
and await for it in the main, the function panics on the calls to tokio::spawn or tokio::sleep.
I can do an await on another async in this library function though.
tokio::runtime::Handle::try_current() invoked from the library returns an error.
What is the right way to do async in this arrangement?

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

No branches or pull requests

1 participant