Hrvoje Niksic <hniksic(a)srce.hr> writes:
Could someone more knowledgable of Xt programming (Didier? Glynn?)
explain if it's OK to add XSync's to various places to ensure that the
information returned by Xt is proper?
It's generally a bad idea to use XSync for something else than
debugging, because it synchronizes the application with the server
itself. XSync will return only when the X server has finished processing all
its requests. The consequence is that it can considerably slow down the
application, because you'll be blocked waiting for all events to be processed,
even those completely unrelated to your problem.
When a synchronization problem occurs, it's almost always the
application's fault (a lack of consistency checking) and always a bad idea to
synchronize with the server. The better solution is to check internally for
consistency. Here it means checking that this window still belongs to a frame
before enquiring the server about an XPointer information.
--
/ / _ _ Didier Verna
http://www.inf.enst.fr/~verna/
- / / - / / /_/ / E.N.S.T. INF C201.1 mailto:vernaļ¼ inf.enst.fr
/_/ / /_/ / /__ / 46 rue Barrault Tel. (33) 01 45 81 80 72
75634 Paris cedex 13 Fax. (33) 01 45 81 31 19