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:
Miss Islington (bot) 2022-09-26 16:57:52 -07:00 committed by GitHub
parent 72a78152f3
commit 232156144c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 23 deletions

View file

@ -857,9 +857,8 @@ async def c4(result):
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))