Hi,
i’ve a method in ruby with is running for long time (hast to watch for
events)
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?
Thnx for help,
Michael
Hi,
i’ve a method in ruby with is running for long time (hast to watch for
events)
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?
Thnx for help,
Michael
2007/7/5, Michael D. [email protected]:
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
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs