Release a semaphore, incrementing the internal counter by one. When it was zero on entry and another task is waiting for it to become larger than zero again, wake up that task.
(self)
| 426 | return True |
| 427 | |
| 428 | def release(self): |
| 429 | """Release a semaphore, incrementing the internal counter by one. |
| 430 | |
| 431 | When it was zero on entry and another task is waiting for it to |
| 432 | become larger than zero again, wake up that task. |
| 433 | """ |
| 434 | self._value += 1 |
| 435 | self._wake_up_next() |
| 436 | |
| 437 | def _wake_up_next(self): |
| 438 | """Wake up the first waiter that isn't done.""" |