[625] in Pthreads mailing list archive

home help back first fref pref prev next nref lref last post

join on any thread question

daemon@ATHENA.MIT.EDU (Mike Butterbrodt)
Wed Apr 9 18:16:44 1997

From: Mike Butterbrodt <MikeB@Postalsoft.com>
To: "'Pthreads Mail Archive'" <pthreads@MIT.EDU>
Date: Wed, 9 Apr 1997 17:02:24 -0500


This question was asked back in Nov. 1995 but I found no answer in the
archive.

In Solaris threads, and NT threads I can join on any thread.  The
pthread_join() does not allow this.  Is there simple solution to obtain
this functionality using Pthreads?

for example, using Solaris threads

main()
{
   thread_t threads[5];
   int i;

   for (i=0;i<5;i++)
   {
      thr_create(.......);
   }

   /* will join on any thread that exits*/
   for (i=0;i<5;i++)
   {
      thr_join(0,0,0);
   }

}

thanks,

Mike Butterbrodt
mikeb@firstlogic.com
Mike B

home help back first fref pref prev next nref lref last post