Created
April 13, 2011 02:59
-
-
Save moro/916881 to your computer and use it in GitHub Desktop.
ライブラリpreload + fork()のコンセプト
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
あー、何か戻ってるな。
sporkの仕組みが判らないとsporkの再発明に過ぎないのかどうかが判らん。。。
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
stdout / stderrの受け渡しをどうしようか考えると結局drbを使いたくなるということが判った。