MCPcopy Create free account
hub / github.com/EasyIME/PIME / release

Method release

python/python3/tornado/locks.py:399–414  ·  view source on GitHub ↗

Increment the counter and wake one waiter.

(self)

Source from the content-addressed store, hash-verified

397 return "<{0} [{1}]>".format(res[1:-1], extra)
398
399 def release(self) -> None:
400 """Increment the counter and wake one waiter."""
401 self._value += 1
402 while self._waiters:
403 waiter = self._waiters.popleft()
404 if not waiter.done():
405 self._value -= 1
406
407 # If the waiter is a coroutine paused at
408 #
409 # with (yield semaphore.acquire()):
410 #
411 # then the context manager's __exit__ calls release() at the end
412 # of the "with" block.
413 waiter.set_result(_ReleasingContextManager(self))
414 break
415
416 def acquire(
417 self, timeout: Optional[Union[float, datetime.timedelta]] = None

Callers 5

__aexit__Method · 0.95
test_acquireMethod · 0.95
test_acquire_timeoutMethod · 0.95

Calls 2

doneMethod · 0.45

Tested by 4

test_acquireMethod · 0.76
test_acquire_timeoutMethod · 0.76