A queue between thread with method push,drop old put into new
Project description
# CustomQueue
CustomeQueue 继承自queue.Queue
只是新增一个push方法 - push(new_item) - 当该队列满的时候,会将队列中最先入队列的元素old_item取出来,会将new_item放入队列 - 然后返回old_item - 当队列不满的时候,直接将new_item入队列,然后返回None - 理论上这个方法不阻塞,也不会抛出异常
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
push_queue-1.1.0.tar.gz
(1.9 kB
view details)
Built Distribution
File details
Details for the file push_queue-1.1.0.tar.gz
.
File metadata
- Download URL: push_queue-1.1.0.tar.gz
- Upload date:
- Size: 1.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: Python-urllib/3.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8aa97a08f4c8482a5686a40f0eea2cd3ac3d09d6197aba1d49cf6e9fb0d8c49c |
|
MD5 | 817d3e4df14fe52a32c3dc91675e46a3 |
|
BLAKE2b-256 | 830dec3f28166e8fd20185ad9ae4be836d092adead1a638bb734aae0f852d8e0 |
File details
Details for the file push_queue-1.1.0-py2.py3-none-any.whl
.
File metadata
- Download URL: push_queue-1.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 2.5 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b23f3ef71e5315576ac06f6b40b6ef74ee6d4214ac060c61710e4071f72d7ec9 |
|
MD5 | 56cf51f33e613257ee8b2eaa436b616c |
|
BLAKE2b-256 | 5c50b7249bdf659a3e6c27b64aad3497c6f7a5a17496164084dac017de2e15e9 |