public void SLazyPublicationLockNoCatch() { for (int i = 0; i < N; i++) { _ = new SLazyPublicationLockNoCatch <int>(() => i); } }
public void IterationSetup() { int N1 = N + 1; lazys = (1..N1).ToArray(i => new Lazy <int>(() => i)); lazyNones = (1..N1).ToArray(i => new Lazy <int>(() => i, LazyThreadSafetyMode.None)); lazyPublicationLocks = (1..N1).ToArray(i => new Lazy <int>(() => i, LazyThreadSafetyMode.PublicationOnly)); slazys = (1..N1).ToArray(i => new SLazy <int>(() => i)); slazyNoCatchs = (1..N1).ToArray(i => new SLazyNoCatch <int>(() => i)); slazyPublicationLocks = (1..N1).ToArray(i => new SLazyPublicationLock <int>(() => i)); slazyPublicationLockNoCatchs = (1..N1).ToArray(i => new SLazyPublicationLockNoCatch <int>(() => i)); slazyNoLocks = (1..N1).ToArray(i => new SLazyNoLock <int>(() => i)); slazyNoLockNoCatchs = (1..N1).ToArray(i => new SLazyNoLockNoCatch <int>(() => i)); valueLazys = (1..N1).ToArray(i => new ValueLazy <int>(() => i)); valueLazyNoCatchs = (1..N1).ToArray(i => new ValueLazyNoCatch <int>(() => i)); valueLazyPublicationLocks = (1..N1).ToArray(i => new ValueLazyPublicationLock <int>(() => i)); valueLazyPublicationLockNoCatchs = (1..N1).ToArray(i => new ValueLazyPublicationLockNoCatch <int>(() => i)); valueLazyNoLocks = (1..N1).ToArray(i => new ValueLazyNoLock <int>(() => i)); valueLazyNoLockNoCatchs = (1..N1).ToArray(i => new ValueLazyNoLockNoCatch <int>(() => i)); }