Go back to using select instead of sleep for the waiters.
git-svn-id: file:///home/svn/framework3/trunk@7729 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
dfa0d155fc
commit
4fb212b54e
|
@ -59,15 +59,13 @@ class PacketResponseWaiter
|
|||
def wait(interval)
|
||||
if( interval and interval == -1 )
|
||||
while(not self.done)
|
||||
sleep 0.1
|
||||
#select(nil, nil, nil, 0.1)
|
||||
select(nil, nil, nil, 0.1)
|
||||
end
|
||||
else
|
||||
begin
|
||||
Timeout.timeout(interval) {
|
||||
while(not self.done)
|
||||
sleep 0.1
|
||||
#select(nil, nil, nil, 0.1)
|
||||
select(nil, nil, nil, 0.1)
|
||||
end
|
||||
}
|
||||
rescue Timeout::Error
|
||||
|
|
Loading…
Reference in New Issue