question about multiwindow mode and application icons

Earle F. Philhower III earle@ziplabel.com
Sat May 17 17:28:00 GMT 2003


Great news there Harold,
At 01:17 PM 5/17/2003 -0400, you wrote:
>I think found the race condition and fixed it.
>
> From the manual, it sounds like XInitThreads is only supposed to be 
> called once per process... either that, or, it is simply not thread 
> safe.  I added the ppmServerStarted mutex code to winMultiWindowXMsgProc 
> () and moved the unlocking of the mutex in all thread functions to occur 
> after the call to XInitThreads.
>Now, those blocks of three ERROR messages that I was getting from 
>winClipboardErrorHandler () are now in the same place, but they are coming 
>from winMultiWindowWMErrorHandler (), as they should.
>So, it looks like we were having a problem with Xlib delivering events to 
>the wrong thread.  Playing it safe with XInitThreads seems to have taken 
>care of this problem.  I can now run with -multiwindow and -clipboard safely.

There are few things more fun than debugging multithreaded race conditions,
like having teeth drilled or listening to Britney Spears...


-Earle F. Philhower, III
  earle@ziplabel.com
  cdrlabel - ZipLabel - FlpLabel
  http://www.cdrlabel.com



More information about the Cygwin-xfree mailing list