[Win32utils-devel] rb_w32_select function patch

Park Heesob phasis at gmail.com
Mon Apr 28 08:45:23 EDT 2008


Hi,
----- Original Message ----- 
From: "Luis Lavena" <luislavena at gmail.com>
To: "Development and ideas for win32utils projects" <win32utils-devel at rubyforge.org>
Sent: Monday, April 28, 2008 7:56 PM
Subject: Re: [Win32utils-devel] rb_w32_select function patch


> On Mon, Apr 28, 2008 at 7:53 AM, Heesob Park <phasis at gmail.com> wrote:
>> Hi, all
>>
>> As you know, rb_w32_select don't work well with standard input.
>> Here is test code:
>>
>> t = Thread.new {
>>    while true
>>      puts "printing a line"
>>      sleep 2
>>    end
>>  }
>>
>> gets
>> t.exit
>> puts "exiting"
>>
>>
>> Following is the first version of patch code of rb_w32_select  function in
>> win32.c
>> It is inspired by cygwin select implementation code and adopted some code
>> from it.
>> The basic idea is creating thread for each file descriptor and wait events.
>>
>> What's your thought about it?
>>
> 
> Park,
> 
> This replacement is compatible with ruby_1_8 branch or just for
> Sapphire? I'll love get this included in 1.8 to solve issues regarding
> One-Click Installer for the time being.
>
I tested code with ruby 1.8.6 p-114  compiled with VC++6.0 and VC++9.0.

Regards,

Park Heesob


More information about the win32utils-devel mailing list