[Win32utils-devel] rb_w32_select function patch

Berger, Daniel Daniel.Berger at qwest.com
Wed Apr 30 10:08:54 EDT 2008


 

> -----Original Message-----
> From: win32utils-devel-bounces at rubyforge.org 
> [mailto:win32utils-devel-bounces at rubyforge.org] On Behalf Of 
> Heesob Park
> Sent: Wednesday, April 30, 2008 2:09 AM
> To: Development and ideas for win32utils projects
> Subject: Re: [Win32utils-devel] rb_w32_select function patch
> 
> Hi,
> 
> 2008/4/29 Daniel Berger <djberg96 at gmail.com>:
> >
> > <snip>
> >
> > That works. Passes my (limited) thread test suite, too. :)
> >
> > Awesome. Many thanks. I'll commit this in the CVS repo for Sapphire.
> >
> > Dan
> >
> Now, I have made rb_w32_select function to work with pipe .
> Here is a test code:
> 
> readPipe, writePipe = IO.pipe
> t = Thread.new { while true; sleep 1; puts "got 
> #{readPipe.readline}"; end }
> 
> i = 1
> while true
>   i += 1
>   sleep 1
>   puts "hello from main"
>   if i>3
>     writePipe.puts "test #{i}\n"
>   end
> end
> 
> t.join

<snip>

Excellent, thanks!

With this in place I'm wondering how open3 could be implemented to work
on Windows without fork and without resorting to a C extension. Or if
IO.popen needs to be reworked. Any thoughts?

Thanks,

Dan


This communication is the property of Qwest and may contain confidential or
privileged information. Unauthorized use of this communication is strictly 
prohibited and may be unlawful.  If you have received this communication 
in error, please immediately notify the sender by reply e-mail and destroy 
all copies of the communication and any attachments.


More information about the win32utils-devel mailing list