Boost logo

Boost :

From: Anthony Williams (anthony_w.geo_at_[hidden])
Date: 2008-03-14 04:00:04


Hi Dean,

Dean Michael Berris <mikhailberis <at> gmail.com> writes:

> On Thu, Mar 13, 2008 at 9:22 PM, Anthony Williams
> <anthony_w.geo <at> yahoo.com> wrote:
> > Dean Michael Berris <dmberris <at> friendster.com> writes:
> >
> > > On Thu, Mar 13, 2008 at 6:04 PM, Anthony Williams
> > > <anthony_w.geo <at> yahoo.com> wrote:
> > > > Dean Michael C. Berris <dmberris <at> friendster.com> writes:
> > > >
> > > > > This has been bothering me a while -- as I'm working on the Memcache++
> > > > > Client that I'm maintaining and continuing to develop, when I try
> > > > > running the unit test(s) I've written in a specific platform I get
> > > > > 'mutex: Invalid argument' errors being thrown with regards to either
> > > > > locking, unlocking, or destroying mutexes.
> > > >
> > > > What does your code look like?
> > >
> > > You can browse the source for the Memcache++ Client here:
> > > http://memcachepp.svn.sourceforge.net/viewvc/memcachepp/trunk/memcache%2B%2B/
> >
> > Thanks. Is the test code available online too? Where does the "mutex: Invalid
> > argument" message come from? This isn't a message from boost.threads.
>
http://memcachepp.svn.sourceforge.net/viewvc/memcachepp/trunk/test/memcache_protocol_test.cpp?view=markup
> is the test which throws on destroying memcache handles, and related
> to locking mutexes.

Thanks. I'll try it on my linux box later.

> This also uses ASIO underneath, and I'm not sure if it may be ASIO
> related. For one thing, it throws a boost::system::system_error which
> encapsulates the 'mutex: Invalid argument' in the 'what()' method. I
> checked Boost.Thread and it throws system errors like ASIO does -- so
> right now I'm limiting it to just Boost.Thread because it seems to be
> the more logical place from which mutex errors would come from.

Boost.Thread doesn't throw system_error anywhere. Most throws are
thread_resource_error, and some are lock_error, but none are system_error.

Anthony

--
Anthony Williams
Just Software Solutions Ltd - http://www.justsoftwaresolutions.co.uk
Registered in England, Company Number 5478976.
Registered Office: 15 Carrallack Mews, St Just, Cornwall, TR19 7UL

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