diff options
author | Zackery Spytz <zspytz@gmail.com> | 2018-10-13 09:26:09 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2018-10-13 09:26:09 (GMT) |
commit | 0461704060474cb358d3495322950c4fd00616a0 (patch) | |
tree | cebe84cdbb8e7c0b2ec7c01e6ffd83aabbd282a3 /Doc | |
parent | e385d0661ecf8bc9ba95c4395d9a11262c2cbfec (diff) | |
download | cpython-0461704060474cb358d3495322950c4fd00616a0.zip cpython-0461704060474cb358d3495322950c4fd00616a0.tar.gz cpython-0461704060474cb358d3495322950c4fd00616a0.tar.bz2 |
bpo-22872: multiprocessing.Queue's put() and get() now raise ValueError if the queue is closed. (GH-9010)
Previously, put() and get() would raise AssertionError and OSError,
respectively.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/multiprocessing.rst | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Doc/library/multiprocessing.rst b/Doc/library/multiprocessing.rst index 8402370..578b548 100644 --- a/Doc/library/multiprocessing.rst +++ b/Doc/library/multiprocessing.rst @@ -787,6 +787,10 @@ For an example of the usage of queues for interprocess communication see available, else raise the :exc:`queue.Full` exception (*timeout* is ignored in that case). + .. versionchanged:: 3.8 + If the queue is closed, :exc:`ValueError` is raised instead of + :exc:`AssertionError`. + .. method:: put_nowait(obj) Equivalent to ``put(obj, False)``. @@ -801,6 +805,10 @@ For an example of the usage of queues for interprocess communication see ``False``), return an item if one is immediately available, else raise the :exc:`queue.Empty` exception (*timeout* is ignored in that case). + .. versionchanged:: 3.8 + If the queue is closed, :exc:`ValueError` is raised instead of + :exc:`OSError`. + .. method:: get_nowait() Equivalent to ``get(False)``. |