[Bug 36692] Bad performance when combineng SetEvent / WaitForSingleObject for synchronizing worker threads

wine-bugs at winehq.org wine-bugs at winehq.org
Fri Jun 13 12:01:39 CDT 2014


http://bugs.winehq.org/show_bug.cgi?id=36692

--- Comment #7 from milasudril at gmail.com ---
(In reply to Vincent Povirk from comment #6)
> DuplicateHandle can still pull an anonymous event handle out of another
> process and start using it.
> 
> So, you either need the server to be able to tell the process that controls
> a handle that it's being moved into the server, or you need a more efficient
> way of doing this that works across processes.

What about letting DuplicateHandle change the behaviour of the event functions.
If an event is created with

    CreateEvent(NULL,0,0,NULL);

set vtable pointers associated with the event so they point to an
implementation like pevents. When something is done that this implementation
cannot do (DuplicateHandle, I guess WaitForMultipleObjects too since that
function can take an hetrogenous array of waitable objects), switch to current
implementation. This implies that all tricky functions need to copy the state
of the event and create it inside wineserver. A drawback is that there will
probably be a need for a mutex when this transfer is done.

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list