A fast and simple queue for inter thread communication
Project description
fque
Overview
Fast Queue (short fque) is a simplified version of the built-in queue.Queue() with basic functionality but higher performance. The inspiration behind this library is to have a highly performant queue that allows inter-thread communication with high throughputs.
fque runs 10x faster than the standard queue implementation by relying on pythons built-in deque and implementing just the minimum needed locks.
Usage
The library can be directly installed from pypi
pip install fque
The usage resembles queue.Queue() but with just the basic functions needed to share information across threads:
import fque
q = fque.Queue()
q.put(1)
result = q.get()
The Queue object accepts a maxsize parameter and the .get() function accepts a block and timeout, same as the standard queue.Queue(). The empty and full checkers are also implemented. Other features as the timeouts for put are not going to be implemented as they reduce the performance of the queue.
Licence & Copyright
Licensed under the MIT License.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file fque-0.0.5.tar.gz
.
File metadata
- Download URL: fque-0.0.5.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5517576f690dddea32491693611eb345676e4a7c73986982bb5f8852646f71a1 |
|
MD5 | 9e1c89abc73eb1e30101592f7c729a24 |
|
BLAKE2b-256 | e7b6b89160c67614da0cb34ca8e5d1d312ec2fdc84940d638428383c12b0c4a4 |
File details
Details for the file fque-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: fque-0.0.5-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a41023b09c37a8c03ba186c2705055521bfc960072f360449ef89e9427beb7b |
|
MD5 | 891617a4497820285fa40f9d9f1ebcf5 |
|
BLAKE2b-256 | c4532810c575f88e262cdd4a04a77b00f03593c05efbcf5049dffa2db9627d45 |