[3] in Pthreads mailing list archive

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

Re: timed reads

daemon@ATHENA.MIT.EDU (Bill Sommerfeld)
Fri Jun 9 12:12:13 1995

To: Rich Salz <rsalz@osf.org>
Cc: pthreads@MIT.EDU
In-Reply-To: Your message of "Fri, 9 Jun 1995 02:10:35 -0400 ."
             <9506090610.AA03393@sulphur.osf.org> 
Date: Fri, 09 Jun 1995 11:30:09 -0400
From: Bill Sommerfeld <sommerfeld@orchard.medford.ma.us>

Hypothetical solution, which probably won't work:

Short of using select() or the non-standard timedread(), the cleanest
way to code something like this may well be to have the timer thread
simply close() the descriptors in question; the waiting threads
*should* then wake up and the reads *should* fail with EBADF.

Unfortunately, I can bet that the threads implementations out there
won't be able to deal with this.  If you do this using CMA threads,
you die with an assertion failure or worse.

I have no idea what would happen in Chris Provenzano's
implementation..

Getting this behavior with kernel threads may be problematic as well
[ :-) ].

						- Bill


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