mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-01 13:08:49 +00:00
tests: systemclock: Stop all stress threads before joining them
This reduces the chance of the main thread getting starved while trying to shut down the test, potentially causing a timeout. Even on an idle 96-processor system this reduces the duration of the systemclock tests from ~8s to ~3s. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/734>
This commit is contained in:
parent
b95941db55
commit
3a380558bd
1 changed files with 6 additions and 0 deletions
|
@ -328,6 +328,9 @@ GST_START_TEST (test_stress_cleanup_unschedule)
|
||||||
for (i = 0; i < num; i++) {
|
for (i = 0; i < num; i++) {
|
||||||
WaitUnscheduleData *d = &data[i];
|
WaitUnscheduleData *d = &data[i];
|
||||||
d->running = FALSE;
|
d->running = FALSE;
|
||||||
|
}
|
||||||
|
for (i = 0; i < num; i++) {
|
||||||
|
WaitUnscheduleData *d = &data[i];
|
||||||
g_thread_join (d->thread_wait);
|
g_thread_join (d->thread_wait);
|
||||||
g_thread_join (d->thread_unschedule);
|
g_thread_join (d->thread_unschedule);
|
||||||
g_mutex_clear (&d->lock);
|
g_mutex_clear (&d->lock);
|
||||||
|
@ -370,6 +373,9 @@ GST_START_TEST (test_stress_reschedule)
|
||||||
for (i = 0; i < num; i++) {
|
for (i = 0; i < num; i++) {
|
||||||
WaitUnscheduleData *d = &data[i];
|
WaitUnscheduleData *d = &data[i];
|
||||||
d->running = FALSE;
|
d->running = FALSE;
|
||||||
|
}
|
||||||
|
for (i = 0; i < num; i++) {
|
||||||
|
WaitUnscheduleData *d = &data[i];
|
||||||
g_thread_join (d->thread_wait);
|
g_thread_join (d->thread_wait);
|
||||||
g_thread_join (d->thread_unschedule);
|
g_thread_join (d->thread_unschedule);
|
||||||
g_mutex_clear (&d->lock);
|
g_mutex_clear (&d->lock);
|
||||||
|
|
Loading…
Reference in a new issue