From 1171c6d2ffe28867f731651b2ba7e0bf9277c94e Mon Sep 17 00:00:00 2001 From: Eric Mutta Date: Wed, 26 Jun 2019 16:27:25 +0300 Subject: [PATCH] Update Monitor.xml Move bracketed comment `(to be moved, the thread must be at the head of the waiting queue)` towards the end of the sentence so it doesn't interrupt the reading flow when the sentence refers to the `Pulse` and `PulseAll` methods. I have also clarified that the thread in question is the one that called the `Wait` method, which helps explain why it would be in the waiting queue and would later be moved to the ready queue when `Pulse` or `PulseAll` are called. --- xml/System.Threading/Monitor.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xml/System.Threading/Monitor.xml b/xml/System.Threading/Monitor.xml index 1d3b9f296a0..faa05a91ff1 100644 --- a/xml/System.Threading/Monitor.xml +++ b/xml/System.Threading/Monitor.xml @@ -128,7 +128,7 @@ ## Pulse, PulseAll, and Wait Once a thread owns the lock and has entered the critical section that the lock protects, it can call the , , and methods. - When the thread that holds the lock calls , the lock is released and the thread is added to the waiting queue of the synchronized object. The first thread in the ready queue, if any, acquires the lock and enters the critical section. The thread is moved from the waiting queue to the ready queue when either the (to be moved, the thread must be at the head of the waiting queue) or the method is called by the thread that holds the lock. The method returns when the calling thread reacquires the lock. + When the thread that holds the lock calls , the lock is released and the thread is added to the waiting queue of the synchronized object. The first thread in the ready queue, if any, acquires the lock and enters the critical section. The thread that called is moved from the waiting queue to the ready queue when either the or the method is called by the thread that holds the lock (to be moved, the thread must be at the head of the waiting queue). The method returns when the calling thread reacquires the lock. When the thread that holds the lock calls , the thread at the head of the waiting queue is moved to the ready queue. The call to the method moves all the threads from the waiting queue to the ready queue. @@ -1456,4 +1456,4 @@ - \ No newline at end of file +