multiprocessing.Queue.get_nowait()

get_nowait() Equivalent to get(False).

multiprocessing.Queue.get()

get([block[, timeout]]) Remove and return an item from the queue. If optional args block is True (the default) and timeout is None (the default), block if necessary until an item is available. If timeout is a positive number, it blocks at most timeout seconds and raises the queue.Empty exception if no item was available within that time. Otherwise (block is False), return an item if one is immediately available, else raise the queue.Empty exception (timeout is ignored in that case).

multiprocessing.Queue.full()

full() Return True if the queue is full, False otherwise. Because of multithreading/multiprocessing semantics, this is not reliable.

multiprocessing.Queue.empty()

empty() Return True if the queue is empty, False otherwise. Because of multithreading/multiprocessing semantics, this is not reliable.

multiprocessing.Queue.close()

close() Indicate that no more data will be put on this queue by the current process. The background thread will quit once it has flushed all buffered data to the pipe. This is called automatically when the queue is garbage collected.

multiprocessing.Queue.cancel_join_thread()

cancel_join_thread() Prevent join_thread() from blocking. In particular, this prevents the background thread from being joined automatically when the process exits – see join_thread(). A better name for this method might be allow_exit_without_flush(). It is likely to cause enqueued data to lost, and you almost certainly will not need to use it. It is really only there if you need the current process to exit immediately without waiting to flush enqueued data to the underlying pipe, and you do

multiprocessing.Queue

class multiprocessing.Queue([maxsize]) Returns a process shared queue implemented using a pipe and a few locks/semaphores. When a process first puts an item on the queue a feeder thread is started which transfers objects from a buffer into the pipe. The usual queue.Empty and queue.Full exceptions from the standard library’s queue module are raised to signal timeouts. Queue implements all the methods of queue.Queue except for task_done() and join(). qsize() Return the approximate size of t

multiprocessing.ProcessError

exception multiprocessing.ProcessError The base class of all multiprocessing exceptions.

multiprocessing.Process.terminate()

terminate() Terminate the process. On Unix this is done using the SIGTERM signal; on Windows TerminateProcess() is used. Note that exit handlers and finally clauses, etc., will not be executed. Note that descendant processes of the process will not be terminated – they will simply become orphaned. Warning If this method is used when the associated process is using a pipe or queue then the pipe or queue is liable to become corrupted and may become unusable by other process. Similarly, if the

multiprocessing.Process.start()

start() Start the process’s activity. This must be called at most once per process object. It arranges for the object’s run() method to be invoked in a separate process.