Magic Mailing List |
|
From: Jeff Solomon (jsolomon AT vlsi DOT stanford.edu) Date: Tue Feb 26 2002 - 15:31:30 EST
> > Could I just remind you that X11 is not thread-safe. I learned > > this the hard way -- it is not clearly documented. And, it > > does make multi-threading Magic a bit more work: a thread > > running DRC could not directly cause paint. I fully admit that I'm not an X11 expert, so please correct me if I'm wrong, but isn't X11 only non-thread safe with respect to two threads making X11 calls simultaneously? I thought that as long as the number of threads making X11 calls is 1, you're ok. Clearly, in the case of a single-threaded program, this number is always 1. When Tim first mentioned a multi-threaded magic, I assumed he meant that one thread would handle X11, one would handle user input, and one or more could handle other tasks like DRC. Clearly, this does require synchronization between the threads, but nothing tricky really.
|
|