subprocesses
Directory actions
More options
Directory actions
More options
subprocesses
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||
README ------ = basic usage (for reference purposes, only) = * linear-evaluation.py demonstrates running a function (sub) on a dataset in linear order = using the threading module = * threading-without-sync.py solve the "too much milk" problem as independent threads (ends up in having too much milk in the fridge, unfortunately) * threading-with-sync.py solve the "too much milk" problem as cooperative threads using global variables (ends up in having the right amount of milk in the fridge) * threading-with-lock.py solve the "too much milk" problem as independent threads using a lock (ends up in having the right amount of milk in the fridge) = using the multiprocessing module = reference: https://docs.python.org/3/library/multiprocessing.html * multiprocessing-sub.py how to run two functions (subs) in parallel * multiprocessing-pool.py how to run a pool of agents (subs) in parallel doing a calculation on a dataset * multiprocessing-pool-arbitrary.py how to run a pool of agents (subs) in parallel doing a calculation on a dataset with output in arbitrary order * multiprocessing-threadpool.py how to run a pool of threads in parallel doing a calculation on a dataset = using the subprocess module = * diskfree.py show the available disk space using an external call * diskfree-grab-output.py show the available disk space using an external call, grab both the return value, and the output = using the threading module = * threading-example.py how to run a pool of threads in parallel doing a calculation on a dataset * threading-queue.py how to invoke two threads, and store the result in a queue