示例#1
0
        public RWLockHelper(ReaderWriterLockSlim @lock, LockMode mode)
        {
            _logger = Program.ServiceProvider.GetRequiredService <ILogger <RWLockHelper> >();

            _dispose = () => { };

            _lock = @lock;
            _mode = mode;

            _pre = $"[{Thread.CurrentThread.ManagedThreadId}: {_lock.GetTag()}] ";

            EnterLock();
        }