From: Robert Klemme Date: 2007-08-09T20:52:44+09:00 Subject: Re: Subprocess or Thread 2007/7/5, Michael Dichtl : > i've a method in ruby with is running for long time (hast to watch for > events) Can you show some code or give more detailed explanation what "watch for events" really means? > I've tried to do it in an Thread, but it doesn't work. > > How can I do a block of code in an subprocess? It's as simple as this: puts $$ fork do puts $$ end $ ruby -e 'puts $$;fork do puts $$ end' 2512 2632 Whether you actually need another process depends on what you do. Kind regards robert