Join on the result thread when running :with_result so that the thread can finish its job before the process exits