Top Document: comp.windows.x Frequently Asked Questions (FAQ) 7/7 Previous Document: 193) How do I render rotated text? Next Document: 195) How can I ensure that only one instance of my application is running? See reader questions & answers on this topic! - Help others by sharing your knowledge Support in Xlib and Xt for multi-threaded X programs is included in X11R6. See the documentation for XInitThreads, XtToolkitThreadInitialize, section 2.7 of the Xlib specification, section 7.12 of the Xt specification, and the article "Multi-Threaded Xlib," The X Resource, Issue 5, by Stephen Gildea. The following discussion applies only to pre-R6 libraries: You cannot use non-thread aware, non-reentrant libraries with threads. If you must do this, you have only one choice: call the functions from the initial thread only. Why opening windows from other threads causes protocol errors can be explained easily: you are accessing shared resources (the display structure, the connection to the display, static data in the Xlib) from a number of threads at the same time, without using any form of exclusive access control. [Thanks to casper@fwi.uva.nl (Casper H.S. Dik)] User Contributions:Top Document: comp.windows.x Frequently Asked Questions (FAQ) 7/7 Previous Document: 193) How do I render rotated text? Next Document: 195) How can I ensure that only one instance of my application is running? Part1 - Part2 - Part3 - Part4 - Part5 - Part6 - Part7 - Single Page [ Usenet FAQs | Web FAQs | Documents | RFC Index ] Send corrections/additions to the FAQ Maintainer: faq%craft@uunet.uu.net (X FAQ maintenance address)
Last Update March 27 2014 @ 02:12 PM
|
Comment about this article, ask questions, or add new information about this topic: