Is there a thin read / write lock for .NET 2.0?

I looked at ReaderWriterLock in .NET 2.0 and ReaderWriterLockSlim in .NET 3.5, and the thin version does not use kernel objects to lock. For my context, which could potentially generate a large (but not huge) number of objects, this sounds better.

But the code that I write should be used both in .NET 2.0 and 3.5 during the transition period, so version 3.5, which looks good for my purposes, cannot be used.

Does anyone have or know about the same class that I can connect to .NET 2.0 and get some of the same benefits?

+5
source share
4 answers

, Microsoft ( ReaderWriterLockSlim ), , , , , , , . , , CodeProject, .

- , , ReaderWriterLockSlim , .NET 2.0? , , " ", , , , . , , , , , .

, , ReaderWriterLock, RWL .

, - , , ReaderWriterLockSlim...

+5

ReadWriteLocker - ReaderWriterLock Alternative, 20% -30% , ReaderWriterLock.

, , :

  • . ReaderWriterLock, .
  • , , . , .NET 4.0 PFX, .
  • , . .
  • , , .
  • ReaderWriterLock ReaderWriterLockSlim.

, , . , , . , , .NET 2.0.

+1

ReaderWriterGate PowerThreading ?

0

I asked a question about the disadvantages of use ReaderWriterLockand there are interesting links containing alternatives ReaderWriterLock. Look at my question .

0
source

All Articles