How to start a thread in rake task, and then kill the tread when the task is completed.
Essentially, I am writing rake taskto test the jekyll site. I would like to be able to start the server, perform some other tasks, and then destroy the thread when the task is complete. Here is what I still have:
task :test_site do
`ejekyll --server`
`git -Xdn`
if agree( "Clean all ignored files?")
git -Xdf
end
end
but unfortunately the only way to stop jekyll --serveris to use ctrl c. I would be glad to hear about the possibility of stopping the jekyll --serverrake in the estate, which does not come out of the task, but please just comment, because the question specifically asked questions about the flow and rake problems.