[Win32utils-devel] win32-thread experiment

win32utils-devel at rubyforge.org win32utils-devel at rubyforge.org
Mon Dec 13 00:43:14 EST 2004

Hi all,

I've checked in some semi-working code into CVS for win32-thread.  I don't 
really expect this to ever work properly, given that the Ruby interpreter 
itself isn't thread safe, but I thought it was fun to tinker.

Anyway, with that in mind, give the following a shot:

require "win32/thread"

t = Win32::Thread.new{
   puts "hello"
   sleep 2

puts "Done"
sleep 1

That should work.  But, if more than one thread gets involved you'll likely 
see errors.

Feel free to tinker. :)

- Dan

More information about the win32utils-devel mailing list