Boost logo

Boost :

From: williamkempf_at_[hidden]
Date: 2001-03-16 10:23:53


--- In boost_at_y..., Doug Gregor <gregod_at_r...> wrote:
> On Thursday 15 March 2001 05:36, you wrote:
> > --- In boost_at_y..., williamkempf_at_h... wrote:
> > > --- In boost_at_y..., <boost_at_y...> wrote:
> > > > Hello,
> > > >
> > > > This email message is a notification to let you know that
> > > > a file has been uploaded to the Files area of the boost
> > > > group.
> > > >
> > > > File : /threads/threads.zip
> > > > Uploaded by : williamkempf_at_h...
> > > > Description : Boost.Threads draft library submission
> > > >
> > > > You can access this file at the URL
> > > >
> > > > http://groups.yahoo.com/group/boost/files/threads/threads.zip
> > > >
> > > > To learn more about file sharing for your group, please visit
> > > >
> > > > http://help.yahoo.com/help/us/groups/files
> >
> > I've uploaded a newer version of this file. It addresses most of
the
> > problems found by others up to this point. I'd appreciate someone
> > testing this with Comeau (and other compilers) to see if I've
fixed
> > the syntax problems. VC++ is too forgiving on many of these
things,
> > making it difficult on me here.
>
> A few more minor issues Comeau found:
> - boost/thread/thread.hpp: #include <string> so that implicit
conversion from
> (const) char* to std::string can occur in the call to
std::runtime_error's
> constructor (not sure if Comeau is acting correctly here or not,
but it can't
> hurt).

Reading the standard I don't see how they could be considered to be
acting "incorrectly", but that's a pain in the neck. I'd prefer not
including <string> in the header here. If Comeau deemed not to in
<stdexcept> I'm not going to in <boost/thread/thread.hpp> either.
So, I've moved the constructor implementation into the source file
where <string> is included. This should fix the problem and retain
the intent of the standard library implementation.

> - boost/thread/condition.hpp: timed_wait needs a return value
if "pred"
> returns true.

Nice catch. I wonder why VC++ didn't complain. Oh well, my kingdom
for a real compiler!

> Also: it isn't clear to me what the intention of "pred" is:
> should it be a function object? a volatile reference to something
convertible
> to bool?

It should have been a function object. I see your point here. The
code will be corrected later today. I also obviously need another
test in the test harness. I'll work on that later as well.
 
> - src/mutex.cpp: a "-1" that should be a
> std::numeric_limits<unsigned>::max().

One slipped through, huh. Ok, fixed.

> - src/mutex.cpp: #include <limits>.

Fixed.

> - src/semaphore.cpp: in the up member function, there is a
conditional:
> if (count < 0 || available + count > max)
> where "count" is unsigned.

Fixed.

Bill Kempf


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