Skip to main content

FsQueue

python FsQueue is a elastic synchronized queue class.

Source code

You can find here https://github.com/masahif/python-FsQueue

Features

The FsQueue module has almost same as python’s queue class.

  • FsQueue is elastic.

  • FsQueue is multi process safe. Multi process can work with FsQueue.

  • FsQueue doesn’t have max size feature so full() always return False.

  • FsQueue might work as FIFO queue.

A quick example

example:

import sys
from multiprocessing import Process
from FsQueue import Queue
from time import sleep

def put(q, num):
    for i in xrange(num):
        print "put:%d" % i
        sys.stdout.flush()
        q.put(i)

def get(q, num):
    for i in xrange(num):
        sys.stdout.flush()
        print "get:%d %d" % (i, q.get())
        q.task_done()

def process_test():
    q = Queue(init=True)
    p0 = Process(target=put, args=(q,1000))
    p0.start()
    p0.join()
    p1 = Process(target=get, args=(q,500))
    p2 = Process(target=get, args=(q,500))
    p1.start()
    p2.start()
    p1.join()
    p2.join()

    if not q.empty():
        print "Queue should be empty."
        raise Exception

if __name__ == '__main__':
    process_test()

Recent Change Log

v1.2

  • A quick example was changed.

v1.1

  • First release

Metadata

Release files for FsQueue 1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for FsQueue 1.2
File Size Uploaded Provenance Actions
FsQueue-1.2.tar.gz 5.1 kB Without provenance Details for FsQueue-1.2.tar.gz

Release files / FsQueue-1.2.tar.gz

Download URL FsQueue-1.2.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
3e4c00d6edfda144ff3015a25b47e5a6cb613d02148cdaf48241f9a26e880615
BLAKE2b-256 checksum
How to use checksums
774e68438e2fb9521729b86ffd72be71f3e08b1ab4dd89adb40bc9810acff2da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for FsQueue 1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.2 This release

1 release file No provenance

1.1

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page