Change stream writes to be non-blocking, this has been pretty heavily tested over the last couple days, and should preserve the original behavior as well. This fixes a deadlock in Ruby in certain conditions
git-svn-id: file:///home/svn/framework3/trunk@10306 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
fa38a19ada
commit
7ccf4e2f11
|
@ -41,7 +41,7 @@ module Stream
|
||||||
next
|
next
|
||||||
end
|
end
|
||||||
data = buf[0, 32768]
|
data = buf[0, 32768]
|
||||||
sent = fd.syswrite( data )
|
sent = fd.write_nonblock( data )
|
||||||
if sent > 0
|
if sent > 0
|
||||||
total_sent += sent
|
total_sent += sent
|
||||||
buf[0, sent] = ""
|
buf[0, sent] = ""
|
||||||
|
|
Loading…
Reference in New Issue