5 ms·
Doesn't Ruby have a limit of 1024 open file descriptors? If some method in Ruby's standard library calls 'select' internally, with the 1024 limit, what happens?
by marketer 14y ago
Doesn't Ruby have a limit of 1024 open file descriptors? If some method in Ruby's standard library calls 'select' internally, with the 1024 limit, what happens?
- slivuz 14y agoit will segfault. that's why EventMachine using epoll on linuxes and kqueue on bsd
- FooBarWidget 14y agoI/O is handled through EventMachine, not the normal Ruby I/O calls, and can therefore scale arbitrarily.
- marketer 14y agoIt is a little worrying that if some (perhaps inexperienced) developer arbitrarily calls a method that invokes Ruby's select, the process will crash mysteriously.
- FooBarWidget 14y agoIt won't crash. On many platforms, Ruby uses special select() hacks to extend the number of file descriptors select() can handle. On OS X it can apparently handle 10556 file descriptors. If you go over that, Ruby apparently simulates an EMFILES error.