org.jruby.util.io
Class SelectBlob

java.lang.Object
  extended by org.jruby.util.io.SelectBlob

public class SelectBlob
extends java.lang.Object

This is a reimplementation of MRI's IO#select logic. It has been rewritten from an earlier version in JRuby to improve performance and readability. This version avoids allocating a selector or any data structures to hold data about the channels/IOs being selected unless absolutely necessary. It also uses simple boolean arrays to track characteristics like whether an IO is pending or unselectable, rather than maintaining Set structures. It avoids hitting Java Integration code to get IO objects out of the incoming Array. Finally, it tries to build a minimal number of data structures an reuse them as much as possible.


Constructor Summary
SelectBlob()
           
 
Method Summary
 IRubyObject goForIt(ThreadContext context, Ruby runtime, IRubyObject[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelectBlob

public SelectBlob()
Method Detail

goForIt

public IRubyObject goForIt(ThreadContext context,
                           Ruby runtime,
                           IRubyObject[] args)


Copyright © 2002-2009 JRuby Team. All Rights Reserved.