From: Eustaquio 'TaQ' Rangel Date: 2007-11-17T01:23:15+09:00 Subject: Suggestion for native thread tests -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi! I'm checking 1.9 and I made a test with two threads reading two files and one reading a FIFO, but seems that the FIFO is blocking the other threads. Is this a valid test for native threads? Using similar code in Java it works as expected. Here's the code: files = %w(thread_test.txt thread_test.fifo thread_test2.txt) threads = [] files.each_with_index do |item,index| threads << Thread.new do while true puts "(#{index}) Reading #{item} on #{Time.now} ..." puts File.read(item) puts "-"*50 sleep 1 end end end threads.first.join Using an updated 1.9 it still blocks when reading the FIFO. I need some suggestion of some test to prove that the native threads are there. :-) Best regards, - -- Eust�quio "TaQ" Rangel http://eustaquiorangel.com "The only way to learn a new programming language is by writing programs in it." B. Kernighan & D. Ritchie -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHPaftb6UiZnhJiLsRAr6LAJ9VhhmtGYBTVKNmBbf1eMPyRdBc3wCcCtdp MHJumIkh61qhtynvMyYanlY= =Aa5a -----END PGP SIGNATURE-----