colour.utilities.multiprocessing_pool¶
- colour.utilities.multiprocessing_pool(*args, **kwargs)[source]¶
A context manager providing a multiprocessing pool.
Examples
>>> from functools import partial >>> def _add(a, b): ... return a + b >>> with multiprocessing_pool() as pool: ... pool.map(partial(_add, b=2), range(10)) ... [2, 3, 4, 5, 6, 7, 8, 9, 10, 11]