Use Thread Pools Correctly: Keep Tasks Short and Nonblocking
Whatarethreadpoolsfor,andhowcanyouusethemeffectively?AsshowninFigure1,threadpoolsareaboutlettingtheprogrammerexpresslotsofpiecesofindependentworkasa"sea"oftaskstobeexecuted,andthenrunningthatworkonase