progschj / ThreadPool

A simple C++11 Thread Pool implementation
zlib License
7.63k stars 2.21k forks source link

Maybe use the lock_guard will be better #106

Open 13579xxl opened 8 months ago

13579xxl commented 8 months ago

Maybe it can make the program faster , because the lock_guard seems more 'lightweight' than the unique_lock If I misunderstand , pardon me.

cuongcb commented 8 months ago

Condition variable requires a unique_lock for its wait() function.