adspace
Should I use readerwriterlock instead of monitor.enter/exit?
Answer Posted / Chandan Kumar Rawat
It depends on your specific use case. If you have multiple readers and a single writer accessing shared resources, a ReaderWriterLock might be more appropriate as it allows concurrent read operations while ensuring exclusive write access. However, if all threads are writing to the resource, using Monitor.Enter/Exit would suffice.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers