Boost logo

Boost :

From: David Abrahams (abrahams_at_[hidden])
Date: 2001-03-15 21:35:30


Bill,

I think you might want to reconsider. It would of course be nice if we could
generalize our thread exceptions and cover all possibilities so that we
didn't have to deliver platform-specific error codes, but it seems to me
that platforms will probably not be reporting the same kinds of errors. At
some point, users will need to know the real reasons for a threading
failure, and may need to respond to the failure in platform-specific ways.

-Dave

----- Original Message -----
From: <williamkempf_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Thursday, March 15, 2001 12:01 PM
Subject: [boost] Re: Boost.Threads draft library submission

--- In boost_at_y..., Eugene Karpachov <jk_at_s...> wrote:
> Thu, Mar 15, 2001 at 04:03:28PM -0000, terekhov_at_y... ÐÉÛÅÔ:
> > > As usual with POSIX, check for -1 as error flag and inspect
errno.
> > You could
> > > throw some exception object containing this errno value.
> > >
> > > --
> > > jk
> >
> > POSIX _threads_ calls do not use errno (-1 as error flag)
> > ZERO return value is used as OK indication, non-zero
> > return value is used as spec. status (error) indication.
>
> Yes, you are right. Must check for !=0; but I insist on errno :)

I will *NOT* throw an exception containing an errno value. Such a
value is not portable (the errnos returned by various thread APIs
will not match) and so will not be useful to programmers. If the
specific type of error that occurred is necessary (I'm not sure it is
in most cases) then we either need to define our own errnos, or
preferrably throw different exceptions (or at least change the what()
text accordingly).

Bill Kempf

List-Unsubscribe: <mailto:boost-unsubscribe_at_[hidden]>

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk