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

(feat) Ability to supply your own shared tokio runtime #3681

Merged
merged 5 commits into from
Mar 21, 2023

Conversation

john-sharratt
Copy link
Contributor

Modified the shared tokio runtime so that they can be set before they are lazy loaded thus allowing the caller to pass in their own runtime

@john-sharratt
Copy link
Contributor Author

john-sharratt commented Mar 20, 2023

@syrusakbary @theduke lets try and close this pull request out please - its needed to fix a stability issue for concurrent runtimes that fight each other

@theduke
Copy link
Contributor

theduke commented Mar 21, 2023

The downside to this is that it will always require a separate runtime now.

Most users would just invoke this from an async context without knowing the internals, and thus be forced into always having two separate tokio runtimes active at once.

I guess it's still a reasonable tradeoff to make, though I do think that specifying the runtime should just be mandatory.

@theduke
Copy link
Contributor

theduke commented Mar 21, 2023

Let's merge this for now regardless.

@theduke theduke merged commit c7d2533 into master Mar 21, 2023
@theduke theduke deleted the better-shared-runtimes branch March 21, 2023 11:28
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.

2 participants