advapi32[2/3]: exit the service process when the last service thread stops [improved]
mikolajz at google.com
Wed Sep 26 17:19:03 CDT 2007
In this patch we don't relay on the function in the service thread to
inform us that it has finished (what might not happen if the thread
crashes) but wait on the thread handle. I haven't found any generic
functions that executes an APC when a handle is signaled so I wrote
some small helper functions (the number of service threads will change
during the lifetime of a process with multiple services so we can't
store them in a static table).
Decreasing the refcount is done in service_reap_thread that is now
executed when the thread becomes signaled instead of from
service_dispatch_thread where is often won't be called as the thread
will be waiting for ConnectNamedPipe.
More information about the wine-patches