Multithreading with APScheduler

  Kiến thức lập trình

I’m trying to use apscheduler to run in parallel mode. I have four function calls that need to run synchronously. Currently, it runs quickly, but sometimes it slows down. For example, initially, it processes each item in about 10 seconds, but after a while, it takes a minute or two. To be precise, I need to process 5,000 image files as quickly as possible. Can someone help me with this?
Obs: The machine this code will run has 1 core and 8 logical processors

enter image description here

I’ve tried to change the numbers of max_workers to six but it didn’t change much.

New contributor

Luana Nitsche is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.