You should have included example for multiprocessing too. Also more practical example, easy to understand real world use case. Also I would suggest you to explore joblib, it much better option than the built-in implementation. It have a common api for peocess based & thread based parallelism.
