# Read changed to blocking in 1.9 windows?

**URL:** <https://www.ruby-forum.com/t/read-changed-to-blocking-in-1-9-windows/168783>\
**Category:** Ruby\
**Created:** [May 25, 2009, 8:40pm UTC](https://www.ruby-forum.com/t/read-changed-to-blocking-in-1-9-windows/168783 "2009-05-25T20:40:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rogerdpack](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/45deac/32.png) [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Post date:** [May 25, 2009, 8:40pm UTC](https://www.ruby-forum.com/t/read-changed-to-blocking-in-1-9-windows/168783/1 "2009-05-25T20:40:51Z")

</div>

Currently with 1.9 if you do a  
#include\<ruby.h\>

by default it overwrites any calls to ‘read’ and ‘accept’ (etc.) to be  
rb\_w32\_read, rb\_w32\_accept (etc).

This worked all right in 1.8.6.  
However, with 1.9 it would appear that inexplicably rb\_w32\_read, if it  
would block (i.e. no data) blocks now, until data is ready. Thus  
rb\_w32\_read behaves differently than the old read used to, and  
differently than the way linux’ read does.  
Is this a bug? I assume it is?  
Thanks.  
-=r

---

<div class="post-metadata">

**Author:** ![rogerdpack](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/45deac/32.png) [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Post date:** [May 25, 2009, 9:52pm UTC](https://www.ruby-forum.com/t/read-changed-to-blocking-in-1-9-windows/168783/2 "2009-05-25T21:52:04Z")

</div>

On 25.05.2009 20:40, Roger P. wrote:

> differently than the way linux’ read does.  
> Is this a bug? I assume it is?  
> Thanks.

Maybe that’s a side effect of using real threads in 1.9. In that case  
using blocking IO might be OK.

Kind regards

robert
