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.0.0.tar.gz
(1.9 kB
view details)
Built Distribution
File details
Details for the file push_queue-1.0.0.tar.gz
.
File metadata
- Download URL: push_queue-1.0.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 | 838fd1fdf5469a70076db6cff9e86793b858dc22af1ee2b7fdc49099ea0bc6d5 |
|
MD5 | 6cea5def05aceab6811beb9cc0a02d69 |
|
BLAKE2b-256 | d4c4cf333da33fcadfddb3f5ba94a9374f4a33468991d80f1acaa376a8fe223f |
File details
Details for the file push_queue-1.0.0-py2.py3-none-any.whl
.
File metadata
- Download URL: push_queue-1.0.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 | bb6c1a03ff1f7476209c0ae30e974d45d234be80e7ebd8255f46f0a85e65cc89 |
|
MD5 | c8ef81a0cfda553174f19f793b92ca42 |
|
BLAKE2b-256 | 067b9981a7e93e49e0cc268b4bd056624ed23fca0eaff76fb13c373a54c6b8b2 |