mirror of https://github.com/davisking/dlib.git
Added missing assert to the thread_pool object
--HG-- extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402637
This commit is contained in:
parent
65c4e4a970
commit
e1a0626b83
|
@ -18,6 +18,13 @@ namespace dlib
|
||||||
task_ready_signaler(m),
|
task_ready_signaler(m),
|
||||||
we_are_destructing(false)
|
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);
|
tasks.expand(num_threads);
|
||||||
for (unsigned long i = 0; i < num_threads; ++i)
|
for (unsigned long i = 0; i < num_threads; ++i)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue