[Win32utils-devel] win32-ipc idea - allow a block

win32utils-devel at rubyforge.org win32utils-devel at rubyforge.org
Sat Oct 23 05:50:33 EDT 2004

Hi Dan,

> What do you think about allowing a block to the various wait methods 
> in win32-ipc?  These could be fired off if signalled, e.g.
> i = IPC.new
> i.wait{ puts "We got a signal!" }

Makes perfect sense to me ... this is very Rubyisque :-)

> That way, you wouldn't constantly have to check the return value.  
> Make sense?  Or not?

I thought wait( )  would  take in a list (array) of objects on which it 
is waiting and an optional timeout parameter. At least that is how Perl 
does it, I think. So I am not sure how to really use this class.
All I would say is keep both forms: block form as well as "check the 
return value later" form.

-- shanko

More information about the win32utils-devel mailing list