MultiThreadingHelper
psengine.helpers.helpers.MultiThreadingHelper
¶
Multithreading class.
multithread_it
staticmethod
¶
Multithreading helper for I/O Operations.
The class can be used in the following way. Given a single thread code like:
PARAMETER | DESCRIPTION |
---|---|
max_workers
|
Number of threads to use.
TYPE:
|
func
|
Function to be executed in parallel.
TYPE:
|
iterator
|
The list of elements to be dispatched to the threads.
TYPE:
|
Example
It can be rewritten like:
RETURNS | DESCRIPTION |
---|---|
list
|
List of objects returned by the calling function. |