… | |
… | |
126 | otherwise return false and leave the semaphore unchanged. |
126 | otherwise return false and leave the semaphore unchanged. |
127 | |
127 | |
128 | =item $sem->waiters |
128 | =item $sem->waiters |
129 | |
129 | |
130 | In scalar context, returns the number of threads waiting for this |
130 | In scalar context, returns the number of threads waiting for this |
131 | semaphore. |
131 | semaphore. Might accidentally cause WW3 if called in other contexts, so |
|
|
132 | don't use these. |
132 | |
133 | |
133 | =item $guard = $sem->guard |
134 | =item $guard = $sem->guard |
134 | |
135 | |
135 | This method calls C<down> and then creates a guard object. When the guard |
136 | This method calls C<down> and then creates a guard object. When the guard |
136 | object is destroyed it automatically calls C<up>. |
137 | object is destroyed it automatically calls C<up>. |