-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
EM::Deferrable replacement #4
Comments
There's nothing like EM::Deferrable right now, sorry. I'll leave this ticket open as a feature request. |
Then is there suggested way to write long running tasks that will not lock reactor? To make example:
I want this to allow accepting another connection before sleep is over. Any suggestions? |
You can spin off long running tasks in separate threads. To unblock the event loop, you can use an AsyncWatcher: https://github.com/tarcieri/cool.io/blob/master/lib/cool.io/async_watcher.rb |
+1 for deferrable mixin.. So much of existing EM code relies on deferrables that not having it in cool.io makes transition pretty painful. |
Let me revisit this... |
I just moved https://github.com/dturnbull/ruby-redis to cool.io. I pulled in EM::Deferrable but I think its interface is wonky and the timer won't work so I have a new one designed that I'll be writing up this week. |
I'm currently using EventMachine, but Cool.IO seems nicer to me(and I think that libev is faster that libevent), but after checking all source I can't find anything like EM::Deferrable - is it unnecessary in Cool.IO or it is just not implemented yet?
The text was updated successfully, but these errors were encountered: