If I do
Process.fork do x end
how can I know what x returned (e.g. true/fase/string) ?
(Writing to a file/database is not an
Yes, you can create a subprocess to execute a block inside.
I recommend the aw gem:
Aw.fork! { 6 * 7 } # => 42
Of course, it prevents from side effects:
arr = ['foo'] Aw.fork! { arr << 'FUU' } # => ["foo", "FUU"] arr # => ["foo"]