What happens if I posed a work to thread pool and the threads are already working in boost?
I have seen this topic (How to create a thread pool using boost in C++?) which explains how to create a pool.
I also found in this topic (https://stackoverflow.com/a/12267138/7108553)
that if I assigned a job to a pool and all the threads are working then the job is discarded.
My question is, is this the case if I created a pool in a similar way to this (How to create a thread pool using boost in C++?)?
my understanding is that if I assigned a job to a pool and all the threads are already working then this will be handled by the library internally and once a thread finishes then the job is assigned to it .. is this correct?
and if not, is there an efficient way to keep track of free and occupied threads?