[1/2] ntdll/tests: Add tests for TpSimpleTryPost function.

Alexandre Julliard julliard at winehq.org
Tue Feb 24 07:57:54 CST 2015


Sebastian Lackner <sebastian at 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 at winehq.org



More information about the wine-devel mailing list