lock statement - C# reference | Microsoft Learn
WebJul 12, 2022 · In this article. The lock statement acquires the mutual-exclusion lock for a given object, executes a statement block, and then releases the lock. While a lock is held, the thread that holds the lock can again acquire and release the lock. Any other thread is blocked from acquiring the lock and waits until the lock is released.
DA: 28 PA: 45 MOZ Rank: 40