[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: thread support

Mark Eichin <eichin@cygnus.com> writes:

> debian's Xfree86 3.2 packages were not built reentrant.  I'm working
> on the 3.3 libraries now, and once they're stable and working,  I'll
> be adding other support to them.  (have you ever tried programming
> with X and threads?  you probably want to only use Display* per-thread
> anyhow...)

Well, it's really nice if you have several data displays (graphs,
progress meters, counters, etc) monitoring different sources of data
generated by separate threads to be able to allow the threads to
update their own displays when they're ready.  You can do this if you
use a big lock to keep multiple threads out of X at the same time.

Everyone should be a little wary of the synchronization primitives in
LinuxThreads.  I believe I determined that semaphores (and condition
variables) do not guarantee FIFO scheduling fairness (I guess I
expected them to, even though the POSIX standard doesn't require it).

I had to write C++ wrapper objects that use their own queues or I
tended to get starvation in situations where I really didn't expect
it.  On the up side, not having these guarantees allows them to make
the code more efficient.


TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .

Reply to: