mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
gh-97545: Make Semaphore run faster. (GH-97549)
(cherry picked from commit 68c46ae68b
)
Co-authored-by: Cyker Way <cykerway@gmail.com>
This commit is contained in:
parent
82932b3ec9
commit
9a9bf88898
3 changed files with 19 additions and 23 deletions
|
@ -844,9 +844,8 @@ class SemaphoreTests(unittest.IsolatedAsyncioTestCase):
|
|||
|
||||
sem.release()
|
||||
sem.release()
|
||||
self.assertEqual(2, sem._value)
|
||||
self.assertEqual(0, sem._value)
|
||||
|
||||
await asyncio.sleep(0)
|
||||
await asyncio.sleep(0)
|
||||
self.assertEqual(0, sem._value)
|
||||
self.assertEqual(3, len(result))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue