Ben Chuanlong Du's Blog

It is never too late to learn.

Parallel and Concurrency Programming in C++11

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

  1. If you use g++ to compile your parallel program which uses the thread library, you need to use the option -lpthread. For more information, see the post GNU/GCC.

  2. The join …

Hands on the Python module Multiprocessing

Comments

  1. multiprocess is a fork of the Python standard libary multiprocessing . multiprocess extends multiprocessing to provide enhanced serialization, using dill. multiprocess leverages multiprocessing to support the spawning of processes using the API of the python standard library's threading module.

  2. multiprocessing.Pool.map does not work with lambda functions due to the fact that lambda functions cannot be pickled. There are multiple approaches to avoid the issue. You can define a function or use functools.partial