fix #6745
This commit is contained in:
parent
07a5f6fb82
commit
93347b3904
@ -1427,13 +1427,16 @@ do_shutdown (void *cls)
|
|||||||
done_task = NULL;
|
done_task = NULL;
|
||||||
}
|
}
|
||||||
/* shut down worker threads */
|
/* shut down worker threads */
|
||||||
GNUNET_assert (0 == pthread_mutex_lock (&work_lock));
|
if (NULL != workers)
|
||||||
in_shutdown = true;
|
{
|
||||||
GNUNET_assert (0 == pthread_cond_broadcast (&work_cond));
|
GNUNET_assert (0 == pthread_mutex_lock (&work_lock));
|
||||||
GNUNET_assert (0 == pthread_mutex_unlock (&work_lock));
|
in_shutdown = true;
|
||||||
for (unsigned int i = 0; i<num_workers; i++)
|
GNUNET_assert (0 == pthread_cond_broadcast (&work_cond));
|
||||||
GNUNET_assert (0 == pthread_join (workers[i],
|
GNUNET_assert (0 == pthread_mutex_unlock (&work_lock));
|
||||||
NULL));
|
for (unsigned int i = 0; i<num_workers; i++)
|
||||||
|
GNUNET_assert (0 == pthread_join (workers[i],
|
||||||
|
NULL));
|
||||||
|
}
|
||||||
if (NULL != done_signal)
|
if (NULL != done_signal)
|
||||||
{
|
{
|
||||||
GNUNET_break (GNUNET_OK ==
|
GNUNET_break (GNUNET_OK ==
|
||||||
|
@ -1798,13 +1798,16 @@ do_shutdown (void *cls)
|
|||||||
done_task = NULL;
|
done_task = NULL;
|
||||||
}
|
}
|
||||||
/* shut down worker threads */
|
/* shut down worker threads */
|
||||||
GNUNET_assert (0 == pthread_mutex_lock (&work_lock));
|
if (NULL != workers)
|
||||||
in_shutdown = true;
|
{
|
||||||
GNUNET_assert (0 == pthread_cond_broadcast (&work_cond));
|
GNUNET_assert (0 == pthread_mutex_lock (&work_lock));
|
||||||
GNUNET_assert (0 == pthread_mutex_unlock (&work_lock));
|
in_shutdown = true;
|
||||||
for (unsigned int i = 0; i<num_workers; i++)
|
GNUNET_assert (0 == pthread_cond_broadcast (&work_cond));
|
||||||
GNUNET_assert (0 == pthread_join (workers[i],
|
GNUNET_assert (0 == pthread_mutex_unlock (&work_lock));
|
||||||
NULL));
|
for (unsigned int i = 0; i<num_workers; i++)
|
||||||
|
GNUNET_assert (0 == pthread_join (workers[i],
|
||||||
|
NULL));
|
||||||
|
}
|
||||||
if (NULL != done_signal)
|
if (NULL != done_signal)
|
||||||
{
|
{
|
||||||
GNUNET_break (GNUNET_OK ==
|
GNUNET_break (GNUNET_OK ==
|
||||||
|
Loading…
Reference in New Issue
Block a user