Doccumetation issue: "The Service Thread" Does it exist?

Ove Kaaven ovehk at ping.uio.no
Fri Jan 24 01:11:09 CST 2003


On Thu, 23 Jan 2003, Robert North wrote:

> This concerns the documentation on thw www.winehq.com website, if it's
> out of date, then this post may be irrelevant.
> 
> In the "Wine Developer's Guide"
> In Section 8.1.4, "The Service thread"
> 
> Says there exists a service thread, that is implemented in:
> 	 scheduler/services.c.
> It also says this thread is used to support the X11 driver's event loop.
> 
> Firstly, I cannot find the "scheduler/services.c" file.

Yeah, the service thread is no more. Everything it did is now done more or
less synchronously, in the thread that needs the functionality, instead of
having another thread do it (or sometimes by shifting more functionality
into the wineserver).

> Secondly from my reading of the x11drv code, the X11 event loop is
> serviced for every call of to X11DRV_MsgWaitForMultipleObjectsEx,
> which is inturn called by MsgWaitForMultipleObjectsEx, and GetMessage.
> Therefore, whichever thread is active will service the X11 event queue.

Almost; each thread has its own display and X11 event queue now, where the
messages that this thread is interested in gets posted. That way there's
no need for a process-wide queue or an independent service thread to
process it, instead the thread can check its own thread-specific queue
whenever it's appropriate for it to do so.

> It also appears, because each thread has it's own XDisplay object that
> messages created by a X11 window will only be picked up in the thread 
> that created the window.

That's right. It even fits the Win32 model better, as there, messages to a
window are always sent to the thread that created the window.




More information about the wine-devel mailing list