mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-20 10:12:15 +01:00
testsuite: Only free the main mutex when and if all the worker threads are done
This commit is contained in:
parent
0324d3b0ec
commit
a02923122e
3
changes/weasel-testuite-thread-fixes
Normal file
3
changes/weasel-testuite-thread-fixes
Normal file
@ -0,0 +1,3 @@
|
||||
o Minor bugfixes:
|
||||
- Testsuite: In the util/threads test no longer free the test_mutex
|
||||
before all worker threads have finished.
|
@ -2356,13 +2356,14 @@ test_util_threads(void)
|
||||
}
|
||||
tor_mutex_release(_thread_test_mutex);
|
||||
}
|
||||
tor_mutex_free(_thread_test_mutex);
|
||||
|
||||
tor_mutex_acquire(_thread_test_start1);
|
||||
tor_mutex_release(_thread_test_start1);
|
||||
tor_mutex_acquire(_thread_test_start2);
|
||||
tor_mutex_release(_thread_test_start2);
|
||||
|
||||
tor_mutex_free(_thread_test_mutex);
|
||||
|
||||
if (timedout) {
|
||||
printf("\nTimed out: %d %d", t1_count, t2_count);
|
||||
test_assert(strmap_get(_thread_test_strmap, "thread 1"));
|
||||
|
Loading…
Reference in New Issue
Block a user