Commit e1a0626b authored by Davis King's avatar Davis King

Added missing assert to the thread_pool object

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402637
parent 65c4e4a9
......@@ -18,6 +18,13 @@ namespace dlib
task_ready_signaler(m),
we_are_destructing(false)
{
// make sure requires clause is not broken
DLIB_ASSERT(num_threads > 0,
"\tthread_pool::thread_pool()"
<< "\n\tthe number of threads in a thread_pool can't be zero"
<< "\n\tthis: " << this
);
tasks.expand(num_threads);
for (unsigned long i = 0; i < num_threads; ++i)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment