Skip to content

Commit

Permalink
Try with scheduler from ruby 3.2.1 (the version from 3.0.3 does not w…
Browse files Browse the repository at this point in the history
…ork with ruby 3.2.1).
  • Loading branch information
cfis committed Apr 17, 2023
1 parent d0fbabe commit 3615365
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/scheduler.rb
Expand Up @@ -14,6 +14,14 @@
end

class Scheduler
experimental = Warning[:experimental]
begin
Warning[:experimental] = false
IO::Buffer.new(0)
ensure
Warning[:experimental] = experimental
end

def initialize
@readable = {}
@writable = {}
Expand Down Expand Up @@ -199,6 +207,7 @@ def io_select(...)
# Used for Kernel#sleep and Thread::Mutex#sleep
def kernel_sleep(duration = nil)
# $stderr.puts [__method__, duration, Fiber.current].inspect

self.block(:sleep, duration)

return true
Expand Down

0 comments on commit 3615365

Please sign in to comment.