From: matz@... (Yukihiro Matsumoto) Date: 2000-07-14T15:28:52+09:00 Subject: [ruby-talk:04002] Re: Thread and File do not work together Hi, In message "[ruby-talk:03971] Thread and File do not work together" on 00/07/13, "Michael Neumann" writes: |following example do not work correctly with my ruby |(ruby 1.4.5 (2000-06-26) [i386-mswin32]) Finally, I got it. |Thread.start { | print "ok\n" | print File::readlines("index.htm").to_s |} |readline | |It prints "ok" but nothing else. |If I comment out the "Thread.start {", then it works. | |What's wrong? Thread.start creates new thread and fork it, then readline meets EOF and raise error in the main thread. When the main thread terminates whole process (including forked thread) be terminated too. Thread.start { print "ok\n" print File::readlines("index.htm").to_s }.join readline will change the situation. matz.