February 2019
Intermediate to advanced
672 pages
16h 50m
English
In the thread module, new threads are created to execute functions concurrently. As we have mentioned, the way to do this is by using the thread.start_new_thread() function:
thread.start_new_thread(function, args[, kwargs])
When this function is called, a new thread is spawned to execute the function specified by the parameters, and the identifier of the thread is returned when the function finishes its execution. The function parameter is the name of the function to be executed, and the args parameter list (which has to be a list or a tuple) includes the arguments to be passed to the specified function. The optional kwargs argument, on the other hand, includes a separate dictionary of additional keyword ...
Read now
Unlock full access