Replace TCPSocket + timeout code with Socket + IO.select
commit4a5794447a682b8034b2381054df28bd6296c4ee
authorEric Wong <normalperson@yhbt.net>
Tue, 23 Dec 2008 02:28:27 +0000 (22 18:28 -0800)
committerEric Wong <normalperson@yhbt.net>
Tue, 23 Dec 2008 02:39:14 +0000 (22 18:39 -0800)
treec97a619da3a27b6b818714e2b083ce0ff8ffe5f5
parentb7ba273a043633c01d9ae8cda8ae9db4cc5dcf07
Replace TCPSocket + timeout code with Socket + IO.select

This removes the dependency on unsafe methods used in the
Timeout class.

Charles makes some good points here:
  http://blog.headius.com/2008/02/rubys-threadraise-threadkill-timeoutrb.html

And even matz agrees:
  http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/294446

Of course, I strongly dislike any unnecessary use of threads,
and implementations using native threads to do timeouts makes me
even more uncomfortable.
lib/mogilefs.rb
lib/mogilefs/backend.rb
lib/mogilefs/httpfile.rb
lib/mogilefs/mogilefs.rb
lib/mogilefs/util.rb