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

Use global Tokio runtime #543

Merged
merged 1 commit into from
Dec 15, 2020
Merged

Conversation

jaspervdm
Copy link
Contributor

Splitting the actual bugfix off from #520. Fixes #509.

Instead of creating a tokio runtime for each request, use a global runtime. Unfortunately, until reqwest updates to tokio 0.3, the runtime will have to be behind a Mutex.

Copy link
Member

@antiochp antiochp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me at a high level.
Ideally somebody with more experience with Tokio can take a look as well.

I don't think the mutex is too much of an issue. I'm guessing most requests are one-by-one anyway and that there will unlikely be much contention (if any).

I'll plan to do some local testing with this today.

Copy link
Member

@quentinlesceller quentinlesceller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. Tested and working well with the owner API.

@antiochp antiochp added this to the 5.0.0 milestone Dec 15, 2020
Copy link
Member

@antiochp antiochp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@jaspervdm jaspervdm removed this from the 5.0.0 milestone Dec 15, 2020
@jaspervdm jaspervdm merged commit f4f4184 into mimblewimble:master Dec 15, 2020
bayk added a commit to mwcproject/mwc-wallet that referenced this pull request Aug 2, 2024
bayk added a commit to mwcproject/mwc-wallet that referenced this pull request Aug 2, 2024
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.

Owner API "can't create Tokio runtime"
3 participants