copy objects before passing arguments to thread, to avoid data races