# File lib/facet/io-reactor.rb, line 321
    def getPendingEvents( timeout )
        eventHandles = IO::select( self.getReadHandles, self.getWriteHandles,
            @handles.keys, timeout ) or return {}
        eventHash = Hash::new {|hsh,io| hsh[io] = []}

        # Fill in the hash with pending events of each type
        [:read, :write, :error].each_with_index {|event,i|
            eventHandles[i].each {|io| eventHash[io].push( event )}
        }
        return eventHash
    end