Thread safe object copying.