Is puts thread safe? I tried having bar return a string rather than print it and having the main code print operation.result after the runloop finished executing. That worked OK with no crash.