colour.utilities.multiprocessing_pool¶
-
colour.utilities.
multiprocessing_pool
(*args, **kwargs)[source]¶ A context manager providing a multiprocessing pool.
Other Parameters: - *args (list, optional) – Arguments.
- **kwargs (dict, optional) – Keywords arguments.
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)) ... # doctest: +SKIP [2, 3, 4, 5, 6, 7, 8, 9, 10, 11]