Hybrid of lock and once. Ensures function is run only once at any given time.