Package org.jruby

Class RubyThread.SleepTask2

java.lang.Object
org.jruby.RubyThread.SleepTask2
All Implemented Interfaces:
RubyThread.Task<Object,Long>, RubyThread.Unblocker<Object>
Enclosing class:
RubyThread

private static class RubyThread.SleepTask2 extends Object implements RubyThread.Task<Object,Long>
A Task for sleeping. The Semaphore is immediately drained on construction, so that any subsequent acquire will block. The sleep is interrupted by releasing a permit. All permits are drained again on exit to ensure the next sleep blocks.