Sebastian Lackner <sebastian(a)fds-team.de> writes:
> + /* post the callback using new threadpool */
> + userdata = 0;
> + memset(&environment, 0, sizeof(environment));
> + environment.Version = 1;
> + environment.Pool = pool;
> + status = pTpSimpleTryPost(simple_cb, &userdata, &environment);
> + ok(!status, "TpSimpleTryPost failed with status %x\n", status);
> + while (userdata == 0) Sleep(10);
> + ok(userdata == 1, "expected userdata = 1, got %u\n", userdata);
Please try to use synchronization objects instead of sleeps.
> + /* make sure worker threads have terminated */
> + Sleep(100);
Same here. Why do you need that?
--
Alexandre Julliard
julliard(a)winehq.org