Skip to content

0.3.0

Choose a tag to compare

@x42005e1f x42005e1f released this 08 Nov 16:38
· 168 commits to main since this release
313fac0

Added

  • culsans.Queue.close() and culsans.Queue.wait_closed() methods, culsans.Queue.closed property to implement compatibility with janus>=1.1.0. For the most part, they behave similarly to the originals (including the exception raised after closing), but semantically they are closer to the queue shutdown methods from Python 3.13. This differs from the janus behavior, but solves aio-libs/janus#237.
  • peek() and peek_nowait() methods, related culsans.Queue._peek() protected method (for overriding), as a way to retrieve an item from a queue without removing it. In a sense, they implement partial compatibility with the gevent queues, but peek/front is also a well-known third type of queue operation.
  • clear() method and related culsans.Queue._clear() protected method (for overriding). Atomically clears the queue, ensuring that other threads do not affect the clearing process, and updates the unfinished_tasks property at the same time. Solves aio-libs/janus#645.