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

Accept tokio handle instead of spinning up your own event loop #11

Closed
nihiluis opened this issue Feb 13, 2018 · 3 comments
Closed

Accept tokio handle instead of spinning up your own event loop #11

nihiluis opened this issue Feb 13, 2018 · 3 comments

Comments

@nihiluis
Copy link

I only checked the examples for the feature, maybe it does already exist (?).

It's useful if you want to have multiple tokio servers in your application, but only one (tokio) event loop.

It's also discussed here (more elaborately):

gotham-rs/gotham#95

@trezm
Copy link
Collaborator

trezm commented Feb 14, 2018

According to this, it looks like this feature is upcoming in Tokio!

Right now we rely on their TcpServer module, that being said, I do believe (and this is likely related to your issue #12,) that we could use their with_handle to grab a core to do work on if you wanted to, say, spawn a hyper request.

@nihiluis
Copy link
Author

Yep. With the upcoming tokio reform there will possibly also be major changes for tokio proto.

tokio-rs/tokio#118

@trezm
Copy link
Collaborator

trezm commented Jul 26, 2018

Closing this as we're now using the tokio handle that's accessible via their default core methods.

@trezm trezm closed this as completed Jul 26, 2018
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

2 participants