using ReaderWriterLockSlim when compiling for .net 4 for improved perfor...

ReaderWriterLockSlim is supposed to improve the lock contention/context switches in a busy application with loads of logging.

http://msdn.microsoft.com/en-us/library/system.threading.readerwriterlockslim.aspx