Skip to content

Commit

Permalink
Use rb_thread_schedule() in the epoll reactor
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm1 committed Feb 8, 2009
1 parent bb66742 commit cc48d8e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ext/em.cpp
Expand Up @@ -520,8 +520,11 @@ bool EventMachine_t::_RunEpollOnce()
}
}

timeval tv = {0,0};
EmSelect (0, NULL, NULL, NULL, &tv);
#ifdef BUILD_FOR_RUBY
if (!rb_thread_alone()) {
rb_thread_schedule();
}
#endif

return true;
#else
Expand Down

0 comments on commit cc48d8e

Please sign in to comment.