Should I use readerwriterlock instead of monitor.enter/exit?
Answer / 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 |
How to implement CAS in .Net?
What is SOAP? How you will do windows and forms authentication?
What is view state?
How ASP .NET different from ASP?
What is connection pooling and how do you make your application use it?
Can we use data reader to bind gridview?
When should I use .net core?
Tell us why do we use the “using” statement?
differance between checkbox and rediobutton in vb.net?
Explain how to spawn a thread?
Describe the use of following com+ services jit activation, queued components, object pooling.?
what is the default security setting in .net?