Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: subclass cant access name mangled method #434

Merged
merged 1 commit into from
Nov 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading