DEV Community

Muramoto Hideyosi
Muramoto Hideyosi

Posted on

How to reduce running time with Multi-threading.

As you all know, we use multi-threading to handle processing parallelly.
I also know it and created 100 threads that create PDF in each thread.
so I am going to create 100 PDFs in one PDF creation time.
image
I have attached my code.
However, even it takes 3 seconds for running thread_body, it took 60 seconds for running the 100 threads.
What's wrong with it?

Top comments (0)