3 ms·
You might be able to do this with decorators in Python, but in Ruby (1.9 or 1.8 w/ the fibers patch) there are libraries that make these calls asynchronous with
by jfarmer 16y ago
You might be able to do this with decorators in Python, but in Ruby (1.9 or 1.8 w/ the fibers patch) there are libraries that make these calls asynchronous with minimal or no changes to your code, e.g., neverblock.
http://www.espace.com.eg/neverblock/ http://www.espace.com.eg/neverblock/
- draegtun 16y agoIn Python i suspect you could use things like Twisted or Multiprocessing (module) here. In Perl there is AnyEvent and luckily CPAN already provides AnyEvent wrappers around pretty much everything! ref: http://search.cpan.org/search?mode=module&query=AnyEvent%3A%3A%2A&complete=1 http://search.cpan.org/search?mode=module&query=AnyEvent... BTW, There is a (fledging but robust) port of Tornado to Perl: http://search.cpan.org/dist/Tatsumaki/ http://search.cpan.org/dist/Tatsumaki/