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

Gevent instead of select()? #10

Closed
est opened this issue Jul 8, 2014 · 4 comments
Closed

Gevent instead of select()? #10

est opened this issue Jul 8, 2014 · 4 comments

Comments

@est
Copy link

est commented Jul 8, 2014

Hi,

First of all, awesome project! Thanks!

I was playing with it and find my gevent.monkey.patch_all() does not work, it turns out that a2s.py has its own select() based loop server. Can we create a protocol abstract and make it possible to adapt with non select() event loops?

@Holiverh
Copy link
Member

Sounds reasonable, but what would be required in order to get it to work with something like gevent?

@est
Copy link
Author

est commented Jul 13, 2014

@Holiverh Maybe separate protocol with event system? E.g. Protocol yield chunks of byte streams, and event system using data = yield something to consume them. We can change to whatever event system in the future.

@Holiverh
Copy link
Member

Hmm. Either way I'm probably gonna have to take a closer look at how gevent works before I could even attempt anything. And that'll take time so I can't foresee myself doing much with it soon. Of course I would be completely open to PRs and such if you want to take a stab at it and you've got some ideas of how it'd work.

Either way, I really appreciate the suggestion. 👍

@est
Copy link
Author

est commented Jul 15, 2014

@Holiverh

Hi, I wrote a dumb version using Gevent

https://github.com/est/tf2.est.im/blob/master/src/main.py

HTH

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