ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro/Coro/Semaphore.pm
(Generate patch)

Comparing Coro/Coro/Semaphore.pm (file contents):
Revision 1.80 by root, Sat Nov 15 06:26:52 2008 UTC vs.
Revision 1.81 by root, Tue Nov 18 23:20:41 2008 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines