a sample implement of thread pool in C language.
If your cmake version is less than 3.29, you can try change the version to fit yours.
If your system don't support the posix thread,
comment the THREADPOOL_POSIX
define marco.
It's better to change the pool MAX_THREAD
and MAX_TASK
to fit your cpu and have the best performance.
git clone ~The URL~
cd ~The Dir~
mkdir build
cd build
cmake ..
cmake --build . --config Release
./ThreadPool