Skip to content

Commit 6a1667f

Browse files
committed
Remove redundant state transitions in CABI code
1 parent 691ae31 commit 6a1667f

File tree

2 files changed

+0
-4
lines changed

2 files changed

+0
-4
lines changed

design/mvp/CanonicalABI.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,6 @@ class AsyncTask(Task):
706706
async def wait(self):
707707
if self.state == AsyncCallState.STARTING:
708708
self.inst.may_enter_async = False
709-
self.unblock_next_pending = False
710709
else:
711710
self.maybe_unblock_next_pending()
712711
return await super().wait()
@@ -722,7 +721,6 @@ class AsyncTask(Task):
722721
self.state = AsyncCallState.STARTED
723722
if not self.inst.may_enter_async:
724723
self.inst.may_enter_async = True
725-
self.unblock_next_pending = len(self.inst.pending_async_tasks) > 0
726724

727725
def return_(self):
728726
trap_if(self.state != AsyncCallState.STARTED)

design/mvp/canonical-abi/definitions.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,6 @@ async def enter(self):
531531
async def wait(self):
532532
if self.state == AsyncCallState.STARTING:
533533
self.inst.may_enter_async = False
534-
self.unblock_next_pending = False
535534
else:
536535
self.maybe_unblock_next_pending()
537536
return await super().wait()
@@ -547,7 +546,6 @@ def start(self):
547546
self.state = AsyncCallState.STARTED
548547
if not self.inst.may_enter_async:
549548
self.inst.may_enter_async = True
550-
self.unblock_next_pending = len(self.inst.pending_async_tasks) > 0
551549

552550
def return_(self):
553551
trap_if(self.state != AsyncCallState.STARTED)

0 commit comments

Comments
 (0)