vendredi 22 août 2014

How to poll operation completion in eventmachine without blocking others?


Vote count:

0




I was modifying Mailcatcher(http://ift.tt/1vpDfnG) which runs 2 servers (EM::SMTPServer and Sinatra+Thin) in event-loop.


I am required to add a module which'll analyze mails with third party framework with REST API, where I have to wait for the analysis to complete (a request to status api which'll respond "completed" eventually). Then the response is required to be processed/parsed (processor intensive).


Is there a "sleep" like method that won't block other modules(SMTP, Thin) because I want to wait for 10 seconds before next status query?


Alternatively is it possible to stop specific periodic_timer (not event-loop/http://ift.tt/YHbUTc)?


Another this is if one task is processor intensive, will eventmachine continue other tasks(like it does for I/O)?



asked 1 min ago







How to poll operation completion in eventmachine without blocking others?

Aucun commentaire:

Enregistrer un commentaire