From: Eric Hodel Date: 2004-12-05T08:38:09+09:00 Subject: Re: [nuby] about ruby multithreading On 04 Dec 2004, at 08:02, Lionel Thiry wrote: >> No, system does not block other ruby threads. > Thanks for the remark... I was a bit confused about my interpretation > of the answer, and I could not test system("sleep 10000") on my > windows2k to see how it works. Maybe only on (some) windows builds it blocks? I no longer have a windows machine handy to test these things on. >> $ cat x.rb >> STDOUT.sync = true > I didn't know that stuff! > It's interesting, where is that documented? ri has it: $ ri IO#sync ---------------------------------------------------------------- IO#sync ios.sync => true or false ------------------------------------------------------------------------ Returns the current ``sync mode'' of _ios_. When sync mode is true, all output is immediately flushed to the underlying operating system and is not buffered by Ruby internally. See also +IO#fsync+. f = File.new("testfile") f.sync #=> false $ ri IO#sync= --------------------------------------------------------------- IO#sync= ios.sync = boolean => boolean ------------------------------------------------------------------------ Sets the ``sync mode'' to +true+ or +false+. When sync mode is true, all output is immediately flushed to the underlying operating system and is not buffered internally. Returns the new state. See also +IO#fsync+. f = File.new("testfile") f.sync = true _(produces no output)_