Date: 2001-09-25 08:04:41
--- In boost_at_y..., "Alexander Terekhov" <terekhov_at_d...> wrote:
> > > > As for errorcheck mutex
> > > > implementations... you don't need full collation you only need
> > > > equality comparison, which boost::thread has already got.
> > >
> > > But I need something to compare to. Are you suggesting that I
> > a
> > > boost::thread object inside the mutex, just for comparison
> > purposes? Is this
> > > the 'official' Boost.Threads way?
> > Well, yes, that would be the current "official" Boost.Threads way.
> IMHO a "better" way (which does not require extra synchronization
> and thread id comparison) to track lock ownership status is to
> use TSD (note that the problem of limited number of "native"
> TSD slots could be solved quite easily and with almost no
> overhead with respect to speed of "second level" TSD set/get
> operations). e.g. recursive lock with error checking,
Actually, fixing the limited number of "native" TSD slots isn't so
easy. The only way to actually fix it would mean that set_specific()
could fail with an out of memory error, which is problematic and
quite different from expected gaurantees of TSD implementations.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk