Hello,
I have said that:
I have provided you with a C++ threadpool that permits you
to code real-time softwares, it is easy to verify the source
code of this C++ threadpool and you will notice that it only
uses static arrays and it doesn't use dynamic memory and of
course it uses pthread.
Please look at the Threadpool bounded queue size, it's at 10000
so in real-time systems and in pratice it's easy to avoid a blocking
task switches on the producer threads which makes it unusable for
interrupt handlers. To simplify, use for example one producer thread and
don't go beyond the size of the queue to be able to implement
real-time softwares under QNX real-time OS or VxWorks real-time OS etc.
You can download the C++ threadpool from here:
https://sites.google.com/site/aminer68/c-threadpool
And you can download my C++ MemPool for real-time systems from here:
https://sites.google.com/site/aminer68/c-mempool-for-real-time-systems
Thank you,
Amine Moulay Ramdane.