David Koolhoven david@koolhoven-home.net writes:
Windows developers expect calls made on a terminating thread to result in ERROR_GEN_FAILURE like a disconnected device, not ERROR_ACCESS_DENIED. Change to code added here: https://source.winehq.org/git/wine.git/commitdiff/442f5f56d1c3367c9d166ef340a682a390bd57cb
QueueUserAPC is expected to create a thread specific FIFO queue. Adding to the end of an unspecified queue on a different thread removes multithreading optimization attempts. Change to code added here: Thread swap on queueAPC call: https://source.winehq.org/git/wine.git/commitdiff/6ca1d1b0812496e670957543294b04abfefe8d78
Removed a set_error call on test to queue_apc to allow for other error reasons besides THREAD_IS_TERMINATING to make it out, and added more informative errror codes inside thread handlers.
Please send separate fixes as separate patches, and try to add test cases.