trigger functions in different threads && thread_join for posix threads

trigger functions in different threads && thread_join for posix threads

Post by Brent Burkholde » Tue, 24 Jun 1997 04:00:00



I need a way to have one thread force another thread to
call a routine.  I'd prefer not jumping into a while loop
and polling a flag variable.  Is there anything similar to
a callback that I could use for this purpose?  An event
handler?  (and if so, how would I go about that?)

As noted in an earlier message, this is to work around
the fact that prior to X11R6, child threads can't
manipulate the display.

Also, in Solaris there were both "pthreads" and "threads."
The thread_join command allowed you to wait for ANY thread
to complete by using NULL as the target thread.  Unfortunately,
compiling this code on HP isn't going to work, since it
supports only POSIX threads.  Is there a similar trick that
can be used with POSIX threads?  (Note that I don't want to
wait for all of the threads to complete, just any arbitrary
thread so that I can start up a new thread again.)

Brent Burkholder