[comp.windows.x] Documentation for Multi-threading

vtn@cs.utexas.EDU (Vinod Thankappan Nair) (04/07/91)

Is there any documentation available that explains the process 
hierachies associated with a widget and/or its window.

I need to know about ways to get two co-operating processes to share
a display+window connection, without screwing each other up. 

Oh yes, these processes need not share the same context, so this is
strictly speaking not multi-threading.

Thanx,

Vinod (vtn@cs.utexas.edu)

mouse@lightning.mcrcim.mcgill.EDU (der Mouse) (04/11/91)

> Is there any documentation available that explains the process
> hierachies associated with a widget and/or its window.

This depends on the operating system the client is running under.
UNIXish systems generally have each window controlled by precisely one
process.

> I need to know about ways to get two co-operating processes to share
> a display+window connection, without screwing each other up.

Normal Xlib does not make this easy.  You will need a special version
of Xlib that has mutual exclusion locks surrounding many sections of
code, special code to deal with sequence numbers, code to make sure
that replies get distributed to the threads correctly, etc, etc.  It is
not a trivial undertaking.  (If you are extremely lucky or have a good
deal of money available, you may be able to find a vendor that already
has such a thing.)

It is normally recommended for each process to open its own connection.
If you do this, they can still both manipulate the same objects (GCs
excepted; each is expected to create its own GCs.)

					der Mouse

			old: mcgill-vision!mouse
			new: mouse@larry.mcrcim.mcgill.edu