summaryrefslogtreecommitdiff
path: root/lib/reline
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2019-09-23 17:31:41 +0900
committeraycabta <aycabta@gmail.com>2019-09-23 17:33:25 +0900
commitb443bdbdb997a6b5c0d6f06cada146f523361980 (patch)
tree85016ad58320607d58ec6037f7ee72038b18b253 /lib/reline
parent934507472c92ccada3f30be183fea5066427efda (diff)
downloadruby-b443bdbdb997a6b5c0d6f06cada146f523361980.tar.gz
Use short wait for select(2)
It is one of the reasons why paste to IRB is slow.
Diffstat (limited to 'lib/reline')
-rw-r--r--lib/reline/ansi.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/reline/ansi.rb b/lib/reline/ansi.rb
index b12dc2f6d3..37ddfa1053 100644
--- a/lib/reline/ansi.rb
+++ b/lib/reline/ansi.rb
@@ -26,7 +26,7 @@ class Reline::ANSI
end
c = nil
loop do
- result = select([@@input], [], [], 0.1)
+ result = select([@@input], [], [], 0.001)
next if result.nil?
c = @@input.read(1)
break
@@ -39,7 +39,7 @@ class Reline::ANSI
end
def self.retrieve_keybuffer
- result = select([@@input], [], [], 0.1)
+ result = select([@@input], [], [], 0.001)
return if result.nil?
str = @@input.read_nonblock(1024)
str.bytes.each do |c|