| | |
| | | public abstract class Concurrent<TSubClass>
|
| | | where TSubClass : Concurrent<TSubClass>
|
| | | {
|
| | | private static readonly object _StaticCriticalSection = new object();
|
| | | protected static object StaticCriticalSection => _StaticCriticalSection;
|
| | | protected static object StaticCriticalSection { get; } = new object();
|
| | |
|
| | | private object _CriticalSection = null;
|
| | | protected object CriticalSection =>
|
| | | StaticThreadSafeInit(() => _CriticalSection, () => _CriticalSection = new object());
|
| | | protected object CriticalSection { get; } = new object();
|
| | |
|
| | | protected T ThreadSafeInit<T>(Func<T> getValue, Action init)
|
| | | where T : class
|