I know Singleton is designed to return a common instance of an object but I want to modify it so that whenever GetInstance() is called, it will create and return an instance of pRay only if it is null. Otherwise, it will return null (instead of pRay). My goal is to allow only one thread access to pRay because I have Task Scheduler calling it every hour, but sometimes it runs for more than an hour and I don't want it to run another thread if it is already running. Right now my code is functioning like a real Singleton (returning the common instance of pRay) and not the way I want it to. How do I modify it so it returns null if pRay is not null? Or is there a better way to accomplish this?