methodmissing / eio

A libeio (http://software.schmorp.de/pkg/libeio.html) wrapper for Ruby
http://github.com/methodmissing/eio
Other
29 stars 0 forks source link

Fails to read big dir in parallel #1

Open funny-falcon opened 12 years ago

funny-falcon commented 12 years ago

Preparation

mkdir many
for i in {1..100000} ; do touch many/$i ; done

Failed

require 'eventmachine'
require 'eio/eventmachine'

EM.run do
  EIO.eventmachine_handler
  EIO.readdir('many') {|f|  }
  EIO.readdir('many') {|f|  }
  EM.add_timer(5){ EM.stop }
end