What does this code do?

You are creating a Windows Forms application. You create a System.Threading.Semaphore
instance in the application by using the follwing code.

Semaphore threadPool = new Semaphore(0, 3);
// …ThreadPool.Release(4);

What does this code do?

You are creating a Windows Forms application. You create a System.Threading.Semaphore
instance in the application by using the follwing code.

Semaphore threadPool = new Semaphore(0, 3);
// …ThreadPool.Release(4);

What does this code do?

A.
Sets the internal counter for the semaphore to 4.

B.
Sets the internal counter for the semaphore to 0.

C.
Throws a SemaphoreFullException.

D.
Throws a ThreadAbortException.



Leave a Reply 0

Your email address will not be published. Required fields are marked *