@@ -851,8 +851,8 @@ For an example of the usage of queues for interprocess communication see
851851 free slot was available within that time. Otherwise (*block * is
852852 ``False ``), put an item on the queue if a free slot is immediately
853853 available, else raise the :exc: `queue.Full ` exception (*timeout * is
854- ignored in that case). Raises :exc: `ShutDown ` if the queue has been shut
855- down.
854+ ignored in that case). Raises the :exc: `queue. ShutDown ` if the queue has
855+ been shut down.
856856
857857 .. versionchanged :: 3.8
858858 If the queue is closed, :exc: `ValueError ` is raised instead of
@@ -871,8 +871,8 @@ For an example of the usage of queues for interprocess communication see
871871 exception if no item was available within that time. Otherwise (block is
872872 ``False ``), return an item if one is immediately available, else raise the
873873 :exc: `queue.Empty ` exception (*timeout * is ignored in that case). Raises
874- :exc: `queue.ShutDown ` if the queue has been shut down and is empty, or if
875- the queue has been shut down immediately.
874+ the :exc: `queue.ShutDown ` exception if the queue has been shut down and
875+ is empty, or if the queue has been shut down immediately.
876876
877877 .. versionchanged :: 3.8
878878 If the queue is closed, :exc: `ValueError ` is raised instead of
@@ -884,14 +884,14 @@ For an example of the usage of queues for interprocess communication see
884884
885885 .. method :: shutdown(immediate=False)
886886
887- Shut- down the queue, making :meth: `~Queue.get ` and :meth: `~Queue.put `
887+ Shut down the queue, making :meth: `~Queue.get ` and :meth: `~Queue.put `
888888 raise :exc: `queue.ShutDown `.
889889
890890 By default, :meth: `~Queue.get ` on a shut down queue will only raise once
891891 the queue is empty. Set *immediate * to true to make :meth: `~Queue.get `
892892 raise immediately instead.
893893
894- All blocked callers of :meth: `~Queue.put ` will be unblocked. If
894+ All blocked callers of :meth: `~Queue.put ` will be unblocked. If
895895 *immediate * is true, also unblock callers of :meth: `~Queue.get ` and
896896 :meth: `~Queue.join `.
897897
@@ -983,11 +983,12 @@ For an example of the usage of queues for interprocess communication see
983983 items have been processed (meaning that a :meth: `task_done ` call was
984984 received for every item that had been :meth: `~Queue.put ` into the queue).
985985
986+ ``shutdown(immediate=True) `` calls :meth: `task_done ` for each remaining
987+ item in the queue.
988+
986989 Raises a :exc: `ValueError ` if called more times than there were items
987990 placed in the queue.
988991
989- Raises :exc: `queue.ShutDown ` if the queue has been shut down immediately.
990-
991992
992993 .. method :: join()
993994
@@ -999,8 +1000,6 @@ For an example of the usage of queues for interprocess communication see
9991000 it is complete. When the count of unfinished tasks drops to zero,
10001001 :meth: `~queue.Queue.join ` unblocks.
10011002
1002- Raises :exc: `queue.ShutDown ` if the queue has been shut down immediately.
1003-
10041003
10051004Miscellaneous
10061005^^^^^^^^^^^^^
0 commit comments