progschj / ThreadPool

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

Remove 'inline' from the destructor #53

Open danilcha opened 6 years ago

danilcha commented 6 years ago

When compiling with GCC using -Winline the compiler warns that the call to the destructor will not be inlined (I use ThreadPool in multiple places):

ThreadPool/ThreadPool.h:87:8: warning: inlining failed in call to 
‘ThreadPool::~ThreadPool() noexcept’: call is unlikely and code size would grow [-Winline]
 inline ThreadPool::~ThreadPool()

Besides, there is no reason in inline here. Removing it.

jhasse commented 6 years ago

I hope you're okay with that I cherry-picked your commit on my fork: https://github.com/jhasse/ThreadPool/commit/5c54162f761c12c82ff3746305652936dcdfa56f :)

danilcha commented 6 years ago

Sure! :)