… | |
… | |
58 | |
58 | |
59 | =item $sem->down |
59 | =item $sem->down |
60 | |
60 | |
61 | Decrement the counter, therefore "locking" the semaphore. This method |
61 | Decrement the counter, therefore "locking" the semaphore. This method |
62 | waits until the semaphore is available if the counter is zero. |
62 | waits until the semaphore is available if the counter is zero. |
|
|
63 | |
|
|
64 | =item $sem->wait |
|
|
65 | |
|
|
66 | Similar to C<down>, but does not actually decrement the counter. Instead, |
|
|
67 | when this function returns, a following call to C<down> or C<try> is |
|
|
68 | guaranteed to succeed without blocking, until the next coroutine switch |
|
|
69 | (C<cede> etc.). |
|
|
70 | |
|
|
71 | Note that using C<wait> is much less efficient than using C<down>, so try |
|
|
72 | to prefer C<down> whenever possible. |
63 | |
73 | |
64 | =cut |
74 | =cut |
65 | |
75 | |
66 | #=item $status = $sem->timed_down ($timeout) |
76 | #=item $status = $sem->timed_down ($timeout) |
67 | # |
77 | # |