-
Notifications
You must be signed in to change notification settings - Fork 93
Frequently Asked Questions
Q: Do I have to use Celluloid::IO
for everything? Can I not use Ruby libraries that use normal blocking I/O?
A: No, you can use blocking I/O libraries, but there are a few corner cases where Celluloid::IO can be quite helpful. Celluloid::IO
allows you to multiplex I/O operations with actor messages in Celluloid
, which can be quite helpful. For more information, please see When should I use Celluloid::IO?
Q: My Celluloid::IO
program has terrible throughput! It's like I can't handle more than one connection at a time! What's happening?
A: Celluloid::IO
allows you to handle many connections from a single actor, however in order to make that work, much like a system like EventMachine or Node.js all I/O operations must be non-blocking (i.e. they must be handled through Celluloid::IO
) and computation must be kept to a minimum.
For a list of "non-blocking" operations that can safely performed inside Celluloid::IO
actors that are managing multiple connections, please see the list of actions which suspend tasks from the Celluloid
execution modes wiki page.