a simple class helping using un-thread-safe class in a safe way