This lesson is part of the Network Testing with Cisco pyATS Course.
In this lesson, we will cover:
- What is Parallel Call?
- Parallel Call basic Usage.
- How does Parallel Call achieve parallel execution?
- Using Parallel Call with Genie and Dq.
The scripts and code for this lesson can be found within the pyATS repo under the directory:
What is Parallel Call?
Parallel Call is a pyATS library that provides you with the ability to run multiple functions in parallel.
Under the hood, Parallel Call uses Python’s
multiprocessing to provide parallelism.
multiprocessing module creates child processes with which to run each thread. The key advantages to using multiple processing are:
- Each process has a separate memory space. Therefore each thread that is executed has its own memory space, allowing non-thread-safe applications (such as pyATS) to be run without issues.
- Each of the CPU Cores is utilised, as each of the spawned processes is placed onto different cores.