SomeObject object; void thread1(SomeObject new_object) { object = new_object; } SomeObject thread2() { return object; }