mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-15 06:18:38 +00:00
Merge "test_threadpool: Wait for each task to complete and fix memory leak." into 13
This commit is contained in:
@@ -636,6 +636,14 @@ AST_TEST_DEFINE(threadpool_thread_timeout_thrash)
|
||||
ast_mutex_unlock(&tld->lock);
|
||||
|
||||
ast_threadpool_push(pool, simple_task, std);
|
||||
|
||||
res = wait_for_completion(test, std);
|
||||
|
||||
ast_free(std);
|
||||
|
||||
if (res == AST_TEST_FAIL) {
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
res = wait_until_thread_state(test, tld, 0, 0);
|
||||
|
||||
Reference in New Issue
Block a user