Build new class to synchronize access to an object