Shut-down the queue, making queue gets and puts raise ShutDown.
By default, gets will only raise once the queue is empty. Set
'immediate' to True to make gets raise immediately instead.
All blocked callers of put() and get() will be unblocked.
If 'immediate', the queue is drained and unfinished tasks
is reduced by the number of drained tasks. If unfinished tasks
is reduced to zero, callers of Queue.join are unblocked.