Best way to share data between threads

Jonathon McKitrick jcm at
Wed Feb 23 03:58:08 GMT 2005

On Tue, Feb 22, 2005 at 02:42:44PM +0200, Giorgos Keramidas wrote:
: 	1) Explicit notification using a condition variable.
: The first can be accomplished by associating a pthread_cond_t with the

I think this is the approach I will use.  As a matter of fact, I added it
today for a different, more limited use, and it worked well.  We have an
instrument that needs firmware ftp'ed to it after a cold start, and I placed
that into a pthread.  I'll try the data acq thread soon.

The only problem is that pthread_join doesn't seem to have a timeout
feature.  So if the thread hangs, I have no way of knowing.

Jonathon McKitrick
My other computer is your Windows box.

More information about the freebsd-questions mailing list