Concurrency

Overview

Prism supports concurrency via the THEADS configuration variable in prism_project.py. This variable tells Prism how many workers should execute the project.

The default value for threads is 1. This means that only one worker is used to execute the tasks in the Prism project, and so non-dependent tasks cannot be run in parallel.

Setting threads = 2 will allow Prism to use two worker processes to execute the tasks. This means that two tasks can be run simultaneously (assuming that those two tasks are not dependent on one another). For example:

For maximum concurrency, you can set THREADS = os.cpu_count():

# prism_project.py

# Imports
import os
...


# Threads
THREADS = os.cpu_count()