Advanced
C#
Q64 / 100
What is the difference between SemaphoreSlim and Semaphore?
Correct! Well done.
Incorrect.
The correct answer is B) SemaphoreSlim is a lightweight intra-process semaphore with async support; Semaphore is a kernel primitive supporting cross-process sync
B
Correct Answer
SemaphoreSlim is a lightweight intra-process semaphore with async support; Semaphore is a kernel primitive supporting cross-process sync
Explanation
SemaphoreSlim.WaitAsync() is async-compatible, crucial for async code. Semaphore wraps a Win32 kernel object and supports cross-process synchronization.
Progress
64/100