Merge pull request #1312

acf908c thread_group: fix build with asserts enabled (moneromooo-monero)
This commit is contained in:
Riccardo Spagni 2016-11-09 14:13:35 +02:00
commit 38727f7d2f
No known key found for this signature in database
GPG Key ID: 55432DF31CCD4FCD

View File

@ -151,7 +151,7 @@ void thread_group::data::dispatch(std::function<void()> f) {
{
const std::unique_lock<std::mutex> lock(mutex);
assert(last != nullptr);
assert(last->next == nullptr);
assert(last->ptr == nullptr);
if (pending == std::numeric_limits<std::size_t>::max()) {
throw std::overflow_error("thread_group exceeded max queue depth");
}