Skip to main content

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

fque-0.0.5.tar.gz (3.2 kB view hashes)

Uploaded Source

Built Distribution

fque-0.0.5-py3-none-any.whl (4.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page