Python thread pool, multithreading, asynchronous

Import thread pool
Define blocking function (requires multi-threaded execution statements) to
prepare parameters, array type, thread pool accepts parameters in array type. One array has one parameter. If the blocking function has multiple parameters, there are several more arrays. If there are no parameters, no arrays are needed.

Demo: I need to open multiple selenium at the same time to perform corresponding operations (click, wait)

First, simply encapsulate the opening and closing of selenium, and see if you can open and close multiple selenium at the same time.

I tried it. One driver can only operate one window. If you want multiple windows at the same time, just define a few more drivers.

Guess you like

Origin blog.csdn.net/Cml_l/article/details/114643094