Skip to content
Snippets Groups Projects
Commit f54714da authored by Avi Kivity's avatar Avi Kivity
Browse files

main: use thread::join in threading test

parent 12875ed4
No related branches found
No related tags found
No related merge requests found
......@@ -120,13 +120,12 @@ void test_threads()
{
test_threads_data tt;
tt.main = thread::current();
char stk1[10000], stk2[10000];
tt.t1ok = tt.t2ok = true;
tt.t1 = new thread([&] { test_thread_1(tt); }, { stk1, 10000 });
tt.t2 = new thread([&] { test_thread_2(tt); }, { stk2, 10000 });
tt.t1 = new thread([&] { test_thread_1(tt); }, { new char[10000], 10000 });
tt.t2 = new thread([&] { test_thread_2(tt); }, { new char[10000], 10000 });
thread::wait_until([&] { return test_ctr >= 1000; });
delete tt.t1;
delete tt.t2;
tt.t1->join();
tt.t2->join();
debug("threading test succeeded");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment