Use rb_thread_select instead of rb_thread_schedule
commit26e7c927f672e4a589e50387ec846c4d89a6b81e
authorRyan Dahl <ry@lakshmi.local>
Fri, 14 Mar 2008 19:19:38 +0000 (14 20:19 +0100)
committerRyan Dahl <ry@lakshmi.local>
Fri, 14 Mar 2008 20:26:30 +0000 (14 21:26 +0100)
treedf9df0e423eaa18b0e6da4abee54dbe08a9296ba
parent53f3e7f84e2c6571b6c97d6ccab3dfc4902253f6
Use rb_thread_select instead of rb_thread_schedule

This cleans up the event loop processing greatly. I use rb_thread_select
to watch for changes on every file descriptor before calling ev_loop(loop,
EVLOOP_NONBLOCK); There is a 0.5 second timeout, to return to ruby for
checking @running and signals.

I still need to run benchmarks on this to make sure that it is still fast
:)
Rakefile
ruby_lib/ebb.rb
src/ebb_ruby.c
test/basic_test.rb
test/helper.rb [new file with mode: 0644]