Created a class that shares objects between threads.