Date: Sun, 16 May 1999 19:36:35 +1000 (EST) From: John Birrell <jb@cimlogic.com.au> To: gurney_j@resnet.uoregon.edu Cc: jb@cimlogic.com.au, dlombardo@excite.com, hackers@FreeBSD.ORG Subject: Re: threads and Xlibs? Message-ID: <199905160936.TAA12519@cimlogic.com.au> In-Reply-To: <19990516014219.56752@hydrogen.nike.efn.org> from John-Mark Gurney at "May 16, 1999 1:42:19 am"
next in thread | previous in thread | raw e-mail | index | archive | help
John-Mark Gurney wrote: > yes, but this is what compiling Xlib with threading support is suppose > to fix this so that you don't have problems... I haven't exactly looked > at what the threading support DOES for Xlib though, but I did manage > to make it so that XInitThreads() would return true, but I never did > get around to making more exhaustive tests... But it doesn't solve anything! I'm sorry, but this just sounds naiive to me. You need to understand how a threaded program intacts with an X server. I have built the X libraries with thread support and all I see is locking around accesses to the X server socket. You have no way to synchronise updates to widgets in your application from multiple threads. Unless you often Xflush the X connection and Xsync it, you end up with incomplete refreshes and events at odds with widget private states. If you don't believe me, try writing a threaded graphic animation program for factory process visualisation where refreshes must be exact. If you have more than one thread consuming X events, you will age quickly. If you have more than one thread updating widget states (remember that there is no thread model for widgets), you will happily die young. -- John Birrell - jb@cimlogic.com.au; jb@freebsd.org http://www.cimlogic.com.au/ CIMlogic Pty Ltd, GPO Box 117A, Melbourne Vic 3001, Australia +61 418 353 137 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199905160936.TAA12519>