celluloid / celluloid-io

UNMAINTAINED: See celluloid/celluloid#779 - Evented sockets for Celluloid actors
https://celluloid.io
MIT License
879 stars 93 forks source link

#wait_readable and #wait_writable have different signature than the ruby methods #169

Open HoneyryderChuck opened 8 years ago

HoneyryderChuck commented 8 years ago

Was inspecting http://ruby-doc.org/stdlib-2.0.0/libdoc/io/wait/rdoc/IO.html#method-i-wait_readable for removal of IO.select calls on some internal stuff. Both wait_* methods accept a timeout parameter. Also, #wait_readable is aliased to #wait . Don't know about the other ones.

tarcieri commented 8 years ago

Yeah, these are the new io/wait API introduced in Ruby 2.0, which Celluloid::IO predates.

I think we should try to support the upstream API.

HoneyryderChuck commented 8 years ago

@tarcieri , either one wraps the #wait call in a Celluloid.timeout, or nio4r should provide support for timed-out IO monitors. Is option B possible?

HoneyryderChuck commented 8 years ago

Shall we continue the discussion here?