[Mongrel] http parser

Francis Cianfrocca garbagecat10 at gmail.com
Sun Aug 20 17:21:12 EDT 2006

On 8/20/06, snacktime <snacktime at gmail.com> wrote:
> I didn't realize that.  I thought they used a native select.  If
> that's the case then EM would actually perform worse, since you are
> always grabbing threads from a pool to run blocking operations and
> then jumping back into the event loop.  I do like how you did your
> parser though, it would be easy to drop that into pretty much any ruby
> project that needs an http parser.

 Read the code, Chris. We use a native select loop built in the normal
(native) way, using fully nonblocking I/O. There are no threads anywhere
inside of EventMachine (except for the thread pool accessed by #defer which
you and I have already corresponded about). When EM is built for a Ruby
environment, it hooks Ruby's thread scheduler to give Ruby a chance to run
its threads. It's not any slower. You've already seen that EM can make 1000
TCP client connections in well under a second.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060820/a0f61357/attachment.html 

More information about the Mongrel-users mailing list