From e706d92e310d9dfb5a05e744676f4cdb64aeab2b Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Fri, 1 Nov 2013 12:59:53 -0700 Subject: shared.pm: Consistent spaces after dots --- dist/threads-shared/lib/threads/shared.pm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'dist/threads-shared') diff --git a/dist/threads-shared/lib/threads/shared.pm b/dist/threads-shared/lib/threads/shared.pm index a4b77a8a88..5a24a9840c 100644 --- a/dist/threads-shared/lib/threads/shared.pm +++ b/dist/threads-shared/lib/threads/shared.pm @@ -406,7 +406,8 @@ the variable, and blocks until another thread does a C or C for that same locked variable. The variable that C blocked on is re-locked after the C is satisfied. If there are multiple threads Cing on the same variable, all but one -will re-block waiting to reacquire the lock on the variable. (So if you're only +will re-block waiting to reacquire the +lock on the variable. (So if you're only using C for synchronization, give up the lock as soon as possible). The two actions of unlocking the variable and entering the blocked wait state are atomic, the two actions of exiting from the blocked wait state and @@ -454,16 +455,19 @@ be recalculated with each pass: =item cond_signal VARIABLE The C function takes a B variable as a parameter and -unblocks one thread that's Cing on that variable. If more than one +unblocks one thread that's Cing +on that variable. If more than one thread is blocked in a C on that variable, only one (and which one is indeterminate) will be unblocked. If there are no threads blocked in a C on the variable, the signal -is discarded. By always locking before signaling, you can (with care), avoid +is discarded. By always locking before +signaling, you can (with care), avoid signaling before another thread has entered cond_wait(). C will normally generate a warning if you attempt to use it on an -unlocked variable. On the rare occasions where doing this may be sensible, you +unlocked variable. On the rare occasions +where doing this may be sensible, you can suppress the warning with: { no warnings 'threads'; cond_signal($foo); } -- cgit v1.2.1