What is a monitor object?


.NET INTERVIEW QUESTIONS - What is a monitor object?

✍: Guest

Monitor objects are used to ensure that a block of code runs without being interrupted by code running on other threads. In other words, code in other threads cannot run until code in the synchronized code block has finished. SyncLock and End SyncLock statements are provided in order to simplify access to monitor object.

2009-12-22, 4730👍, 0💬