-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: export cython primitive interfaces
- Loading branch information
1 parent
aab5ec5
commit fd200fc
Showing
10 changed files
with
54 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,8 @@ | ||
from a_sync.primitives.locks.counter import CounterLock | ||
from a_sync.primitives.locks.event cimport CythonEvent as Event | ||
from a_sync.primitives.locks.counter cimport CounterLock | ||
from a_sync.primitives.locks.event cimport CythonEvent as Event | ||
from a_sync.primitives.locks.prio_semaphore cimport PrioritySemaphore | ||
from a_sync.primitives.locks.semaphore cimport ( | ||
DummySemaphore, | ||
Semaphore, | ||
ThreadsafeSemaphore, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
from a_sync.primitives.locks.counter import CounterLock | ||
from a_sync.primitives.locks.event import CythonEvent as Event | ||
from a_sync.primitives.locks.prio_semaphore import PrioritySemaphore | ||
from a_sync.primitives.locks.semaphore import ( | ||
DummySemaphore, | ||
Semaphore, | ||
ThreadsafeSemaphore, | ||
) | ||
from a_sync.primitives.locks.prio_semaphore import PrioritySemaphore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
from a_sync.primitives.locks.semaphore cimport Semaphore | ||
|
||
cdef class _AbstractPrioritySemaphore(Semaphore): | ||
cdef dict[object, _AbstractPrioritySemaphoreContextManager] _context_managers | ||
cdef Py_ssize_t _capacity | ||
cdef list _potential_lost_waiters | ||
cdef object _top_priority | ||
cdef object _context_manager_class | ||
cdef list[_AbstractPrioritySemaphoreContextManager] __waiters | ||
cdef object c_getitem(self, object priority) | ||
cdef dict[object, int] _count_waiters(self) | ||
|
||
cdef class _AbstractPrioritySemaphoreContextManager(Semaphore): | ||
cdef _AbstractPrioritySemaphore _parent | ||
cdef object _priority | ||
cdef str _priority_name | ||
cpdef str _repr_no_parent_(self) | ||
cdef str _c_repr_no_parent_(self) | ||
|
||
cdef class _PrioritySemaphoreContextManager(_AbstractPrioritySemaphoreContextManager): | ||
pass | ||
|
||
cdef class PrioritySemaphore(_AbstractPrioritySemaphore): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters