[PATCH 1/2] server: Store async list in process object and use that to find async in cansel_async request.

Alexandre Julliard julliard at winehq.org
Thu Dec 1 08:33:43 CST 2016


Jacek Caban <jacek at codeweavers.com> writes:

> On 01.12.2016 12:52, Alexandre Julliard wrote:
>> Jacek Caban <jacek at codeweavers.com> writes:
>>
>>>> We'd probably need to clear them explicitly at process exit.
>>> I agree that we should. I will send a new series implementing that. I
>>> tested that with the attached patch (I can't send it to wine-patches yet
>>> because it uses pipes in message mode).
>> Thread exit would be interesting to test too.
>
> I tested that and it seems that Windows aborts asyncs on thread exit.
> It's easy to implement aborting itself in Wine, but I must admit that I
> have very mixed feelings about it.
>
> I would expect to be able to initialize an async I/O in one thread and
> handle its completion in another. That's how threadpool - based
> applications are likely to work and, maybe not literally, but [1] gives
> an impression that it's supported. I tried to test threadpool with the
> attached test, but it throws an exception in TerminateThread call, not
> allowing me to terminate that thread. That makes me think that it
> supports splitting async I/O between threads by heavily ensuring that
> affected threads are not terminated. We don't have something like that
> in Wine and I find it very risky to implement async cancellation on
> thread exit at this point.

It looks like it would need more work, yes. I guess for now, freeing
them at process exit is still better than not freeing them at all ;-)
Thanks for checking this!

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list