fraunhoferhhi / vvdec

VVdeC, the Fraunhofer Versatile Video Decoder
https://www.hhi.fraunhofer.de/en/departments/vca/technologies-and-solutions/h266-vvc.html
BSD 3-Clause Clear License
454 stars 91 forks source link

Thread pool pause #41

Closed ChristianFeldmann closed 3 years ago

ChristianFeldmann commented 3 years ago

Hi @K-os ,

so I think I found a way to pause the thread pool without costing any performance. Basically the last running thread is only paused in case all other threads are also waiting and after a certain timeout (pausing the thread pool should just be a last resort in case the library is actually paused).

I compared to the unmodified version and could not observe any performance hit.

Maybe this could be a good starting point.

K-os commented 3 years ago

Cool thanks! I'll look into it.

From a first glance it looks conceptually pretty much how I also would have approached it.