mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Use short wait for select(2)
It is one of the reasons why paste to IRB is slow.
This commit is contained in:
parent
934507472c
commit
b443bdbdb9
1 changed files with 2 additions and 2 deletions
|
@ -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|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue