What is a monitor object?

Q

.NET INTERVIEW QUESTIONS - What is a monitor object?

✍: Guest

A
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, 4703👍, 0💬