multiprocessing.SimpleQueue
Prev: multiprocessing.set_start_method | Up: multiprocessing | Next: multiprocessing.TimeoutError
Rel: multiprocessing.active_children, multiprocessing.allow_connection_pickling, multiprocessing.Array, multiprocessing.AuthenticationError
Ref: docs.python.org — multiprocessing.SimpleQueue
Tags: #public #python3 #stdlib #multiprocessing
Import
import multiprocessing
from multiprocessing import SimpleQueue
Signature & Overview
multiprocessing.SimpleQueue()
Returns a queue object
Usage
import multiprocessing as mp
sq = mp.SimpleQueue()
sq.put("msg")
assert sq.get() == "msg"
Gotchas
- Simpler & lighter than
Queue: No background feeder thread, but lacksmaxsize,qsize(), andtimeout=parameters.
REPL Inspect
from multiprocessing import SimpleQueue
help(SimpleQueue)
Linked from
Related notes
- tuts/python3/stdlib_module/multiprocessing/set_start_method Linked here; links to this page; shared tags: #multiprocessing, #stdlib
- tuts/python3/stdlib_module/multiprocessing/TimeoutError Linked here; links to this page; shared tags: #multiprocessing, #stdlib
- tuts/python3/stdlib_module/multiprocessing Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/multiprocessing/active_children Linked here; shared tags: #multiprocessing, #stdlib
- tuts/python3/stdlib_module/multiprocessing/allow_connection_pickling Linked here; shared tags: #multiprocessing, #stdlib
- tuts/python3/stdlib_module/multiprocessing/Array Linked here; shared tags: #multiprocessing, #stdlib
- tuts/python3/stdlib_module/multiprocessing/AuthenticationError Linked here; shared tags: #multiprocessing, #stdlib
- tuts/python3/stdlib_module/multiprocessing/Barrier shared tags: #multiprocessing, #stdlib
- tuts/python3/stdlib_module/multiprocessing/BoundedSemaphore shared tags: #multiprocessing, #stdlib
- tuts/python3/stdlib_module/multiprocessing/BufferTooShort shared tags: #multiprocessing, #stdlib