Skip to content

Commit

Permalink
fix: subclass cant access name mangled method (#434)
Browse files Browse the repository at this point in the history
  • Loading branch information
BobTheBuidler authored Nov 23, 2024
1 parent 52b277a commit 0167fff
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions a_sync/primitives/locks/prio_semaphore.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -349,10 +349,10 @@ cdef class _AbstractPrioritySemaphoreContextManager(Semaphore):
async def __acquire(self) -> Literal[True]:
cdef object loop, fut
while self._parent._Semaphore__value <= 0:
if self.__waiters is None:
self.__waiters = deque()
if self._AbstractPrioritySemaphoreContextManager__waiters is None:
self._AbstractPrioritySemaphoreContextManager__waiters = deque()
fut = (self.__loop or self._c_get_loop()).create_future()
self.__waiters.append(fut)
self._AbstractPrioritySemaphoreContextManager__waiters.append(fut)
self._parent._potential_lost_waiters.append(fut)
try:
await fut
Expand Down Expand Up @@ -394,7 +394,7 @@ cdef class _PrioritySemaphoreContextManager(_AbstractPrioritySemaphoreContextMan
def __cinit__(self):
self._priority_name = "priority"
# Semaphore.__cinit__(self)
self.__AbstractPrioritySemaphoreContextManager__waiters = deque()
self._AbstractPrioritySemaphoreContextManager__waiters = deque()
self._decorated: Set[str] = set()

def __lt__(self, _PrioritySemaphoreContextManager other) -> bool:
Expand Down

0 comments on commit 0167fff

Please sign in to comment.