public GlobeTransitionHandler(IGlobeExpander globeExpander, ITransitionPool transitionPool) { _globeExpander = globeExpander ?? throw new ArgumentNullException(nameof(globeExpander)); _transitionPool = transitionPool ?? throw new ArgumentNullException(nameof(transitionPool)); _semaphoreSlim = new SemaphoreSlim(1, 1); }
public GlobeTransitionHandler(IGlobeExpander globeExpander, ITransitionPool transitionPool) { _globeExpander = globeExpander ?? throw new ArgumentNullException(nameof(globeExpander)); _transitionPool = transitionPool ?? throw new ArgumentNullException(nameof(transitionPool)); //Instantiate a Singleton of the Semaphore with a value of 1. This means that only 1 thread can be granted access at a time. _semaphoreSlim = new SemaphoreSlim(1, 1); }