Re: [c++-pthreads] C++ and posix threads
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [c++-pthreads] C++ and posix threads



On Tue, Dec 23, 2003 at 11:03:14AM -0500, Ted Baker wrote:
> 
> How do you propose to modify read() to throw an exception and
> still have backwards compatability with applications that expect
> read() to always return (more specifically, to return -1 if it
> fails)?

This is the second time you have asked this.  I haven't noticed 
anybody on this list suggesting read() should throw an exception.  

The only detailed proposal thus far has read() returning -1 in the 
event of cancellation.  It might be tricky getting a read() call 
that is already waiting on input to return immediately.  That might
seem to require cooperation from the kernel, but clever use of a 
signal might suffice.

As Mark notes, implementation details are for implementers.  Our task 
here is to decide what to implement.  If what we decide we want turns 
out to be too hard to implement, we will have to adjust our 
expectations.

Nathan Myers
ncm@xxxxxxxxxxx