I have a function which receives 2 arguments. This function actually interfaces a certain communication devices and writes several lines in its CLI.
I need to do this same CLI writing concurrently on 4 devices.
by using the following code (only an example don't refer to the contents of func1) I know how to run a thread that performs this function. But, I don't know how to start 4 threads.
import _thread
def func1(arg1, arg2):
print("Write to CLI")
_thread.start_new_thread(func1, (DUT1_CLI, '0'))