[prev in list] [next in list] [prev in thread] [next in thread]
List: wine-devel
Subject: Re: [1/2] ntdll/tests: Add tests for TpSimpleTryPost function.
From: Alexandre Julliard <julliard () winehq ! org>
Date: 2015-02-24 13:57:54
Message-ID: 87vbirqun1.fsf () winehq ! org
[Download RAW message or body]
Sebastian Lackner <sebastian@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@winehq.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic