ruby-changes:67296
From: aycabta <ko1@a...>
Date: Sun, 29 Aug 2021 20:30:39 +0900 (JST)
Subject: [ruby-changes:67296] d7f654ad5a (master): [ruby/reline] Add "sleep 0.01" to Windows event loop
https://git.ruby-lang.org/ruby.git/commit/?id=d7f654ad5a From d7f654ad5a688dfcd6c274346c437e36ce249c4f Mon Sep 17 00:00:00 2001 From: aycabta <aycabta@g...> Date: Fri, 20 Aug 2021 23:14:42 +0900 Subject: [ruby/reline] Add "sleep 0.01" to Windows event loop https://github.com/ruby/reline/commit/dfc89eae53 --- lib/reline/windows.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/reline/windows.rb b/lib/reline/windows.rb index 5b4cb05..520ac59 100644 --- a/lib/reline/windows.rb +++ b/lib/reline/windows.rb @@ -218,6 +218,7 @@ class Reline::Windows https://github.com/ruby/ruby/blob/trunk/lib/reline/windows.rb#L218 def self.check_input_event num_of_events = 0.chr * 8 while @@output_buf.empty? #or true + sleep 0.01 next if @@GetNumberOfConsoleInputEvents.(@@hConsoleInputHandle, num_of_events) == 0 or num_of_events.unpack('L').first == 0 input_record = 0.chr * 18 read_event = 0.chr * 4 -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/