You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support for more libraries. Culsans inherits aiologic compatibility and thus supports at least 6 (7 if you count AnyIO) different libraries, which gives at least 36 possible communication directions. Janus supports only two: threading and asyncio.
Support for multiple event loops. Unlike Janus, Culsans does not bind to the current event loop, which allows you to use Culsans independently of event loops: you can use Culsans in any combination to communicate between any event loop at the same time. Janus supports only two models: either only normal threads (since 1.2.0 and Python 3.10), or only one asyncio event loop and an arbitrary number of worker threads.
Support for additional methods. Culsans has both useful methods that Janus abandoned, such as atomic queue.clear(), and unique features such as growing & shrinking. This allows Culsans to be used in more scenarios than Janus, which only provides standard methods.
Greater convenience. Culsans works as is and does not require "closing" the queue. This allows Culsans to be used like a normal queue. When working with Janus, in contrast, you need to remember both that it binds to the current event loop when used (when created on Python <3.10), and that it must be closed after use to avoid asyncio warnings.
Better performance. Janus uses existing primitives from the queue and asyncio modules for its work, and initiates the creation of new asyncio tasks in methods such as queue.get_nowait() and queue.put_nowait(). Culsans instead relies on aiologic, and due to this does not create new tasks. It uses one common waiting queue for all, which also reduces the number of operations.
It is worth noting that Culsans was created before Janus 1.2.0 as a proof of concept. At that time, there was a serious performance gap: Janus was 8 times or more slower in some tests and a thousand times slower in other tests. After a number of PRs (some of which are mine), Janus performance came very close to that of Culsans. But the work to speed up Culsans continues, and mostly by improving aiologic.
Drawbacks:
Alpha development status. Both aiologic and culsans are new packages that are not yet sufficiently tested. Both are developed by a single person (that's me) in their spare time, with no monetization. It often happens that I will miss something somewhere, and as a result miss some serious bug or even make a regression, and often quite silly (see aiologic's changelog). The audience is also very small, especially with Culsans, so the likelihood of someone other than me finding a bug is very low. Because of this, it can be risky to use my packages in production.
Activity
x42005e1f commentedon Mar 18, 2025
Benefits:
Support for more libraries. Culsans inherits aiologic compatibility and thus supports at least 6 (7 if you count AnyIO) different libraries, which gives at least 36 possible communication directions. Janus supports only two: threading and asyncio.
Support for multiple event loops. Unlike Janus, Culsans does not bind to the current event loop, which allows you to use Culsans independently of event loops: you can use Culsans in any combination to communicate between any event loop at the same time. Janus supports only two models: either only normal threads (since 1.2.0 and Python 3.10), or only one asyncio event loop and an arbitrary number of worker threads.
Support for additional methods. Culsans has both useful methods that Janus abandoned, such as atomic
queue.clear(), and unique features such as growing & shrinking. This allows Culsans to be used in more scenarios than Janus, which only provides standard methods.Greater convenience. Culsans works as is and does not require "closing" the queue. This allows Culsans to be used like a normal queue. When working with Janus, in contrast, you need to remember both that it binds to the current event loop when used (when created on Python <3.10), and that it must be closed after use to avoid asyncio warnings.
Better performance. Janus uses existing primitives from the queue and asyncio modules for its work, and initiates the creation of new asyncio tasks in methods such as
queue.get_nowait()andqueue.put_nowait(). Culsans instead relies on aiologic, and due to this does not create new tasks. It uses one common waiting queue for all, which also reduces the number of operations.It is worth noting that Culsans was created before Janus 1.2.0 as a proof of concept. At that time, there was a serious performance gap: Janus was 8 times or more slower in some tests and a thousand times slower in other tests. After a number of PRs (some of which are mine), Janus performance came very close to that of Culsans. But the work to speed up Culsans continues, and mostly by improving aiologic.
Drawbacks: