Skip to content

Instantly share code, notes, and snippets.

@moro
Created April 13, 2011 02:59
Show Gist options
  • Save moro/916881 to your computer and use it in GitHub Desktop.
Save moro/916881 to your computer and use it in GitHub Desktop.
ライブラリpreload + fork()のコンセプト
require 'cucumber'
while(f = File.read('features/run').strip) do
Process.detach(Process.fork {
::ActiveRecord::Base.connection.reconnect!;
::Cucumber::Cli::Main.new([f], $stdout, $stderr).execute!
}).join
puts 'done!!'
end
@moro
Copy link
Author

moro commented Apr 13, 2011

stdout / stderrの受け渡しをどうしようか考えると結局drbを使いたくなるということが判った。

@moro
Copy link
Author

moro commented Apr 13, 2011

あー、何か戻ってるな。
sporkの仕組みが判らないとsporkの再発明に過ぎないのかどうかが判らん。。。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment