System.Threading.ReaderWriterLock.TryGetOrCreateReaderEvent C# (CSharp) Méthode

TryGetOrCreateReaderEvent() private méthode

private TryGetOrCreateReaderEvent ( ) : ManualResetEventSlim
Résultat ManualResetEventSlim
        private ManualResetEventSlim TryGetOrCreateReaderEvent()
        {
            // The intention is to catch all exceptions, so that the caller can try again. Typically, only OutOfMemoryException
            // would be thrown, but the idea is that any exception that may be thrown will propagate to the user on a different
            // path, through AcquireReaderLock.
            try
            {
                return GetOrCreateReaderEvent();
            }
            catch
            {
                return null;
            }
        }