Uploaded image for project: 'Log4net'
  1. Log4net
  2. LOG4NET-232

Use ReaderWriterLockSlim instead of ReaderWriterLock.

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.2.10
    • Fix Version/s: 1.2.12
    • Component/s: None
    • Labels:
      None
    • Environment:
      Any

      Description

      ReaderWriterLock should be replaced with ReaderWriterLockSlim according to Microsoft for performance and simplification reasons.

      MSDN: http://msdn.microsoft.com/en-us/library/system.threading.readerwriterlock.aspx

      The .NET Framework has two reader-writer locks, ReaderWriterLockSlim and ReaderWriterLock. ReaderWriterLockSlim is recommended for all new development. ReaderWriterLockSlim is similar to ReaderWriterLock, but it has simplified rules for recursion and for upgrading and downgrading lock state. ReaderWriterLockSlim avoids many cases of potential deadlock. In addition, the performance of ReaderWriterLockSlim is significantly better than ReaderWriterLock.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                nachbarslumpi Dominik Psenner
                Reporter:
                aronweiler Aron Weiler
              • Votes:
                2 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: