ThreadPoolExecutor map method with multiple parameters

ThreadPoolExeuctor from concurrent.futures package in Python 3 is very useful for executing a task (function) with a set of data (parameter) concurrently and this post lists examples on how to pass MULTIPLE parameters to the task being executed.

Python multithreading

Python multithreading. NOTE that although multiple threads can run within the python interpreter, ONLY one thread is being executed by the interpreter at any given time, which is ensured by the GIL (global interpreter lock) in python virtual machine. Python multithreading is more appropriate for I/O-bound applications than for CPU-bound applications as I/O releases GIL.

Java multithreading

Java multithreading programming demo.