Boost logo

Boost :

From: Eames, Andrew (andrew_at_[hidden])
Date: 2007-12-21 09:23:34

Thanks for the suggestions - I already have my mutex classes. I was just
looking to throw them away and use something more off the shelf. It
looks like this is on the way so I think I'll just be patient and wait!

-----Original Message-----
From: boost-bounces_at_[hidden]
[mailto:boost-bounces_at_[hidden]] On Behalf Of Phil Endecott
Sent: Thursday, December 20, 2007 7:15 PM
To: boost_at_[hidden]
Subject: Re: [boost] Boost.Thread and extensibility

Eames, Andrew wrote:
> I've been looking at Boost.Thread and it seems that it
> relies on one of a fixed few threading libraries to exist. I have my
> native implementation of mutexes etc. and it doesn't seem like there
> any easy way to plug it in without editing a lot of the boost source.

Hi Andrew,

I have also written a few of my own mutex and thread classes. What
sort of integration do you want between your mutexes (etc) and the
Boost code? Some of the things that occurred to me were:

- Make boost::mutex (etc) actually use your code on your platform; I
think this requires that you augment the Boost code with an additional
set of #if blocks. You might prefer to just write your own classes
with interfaces compatible with the Boost ones and select them by means
of "using namespace".

- Make your classes inter-operate with the Boost classes (e.g. using
your mutex with the Boost lock or condition class); this is more
possible with the newer Boost and proposed std:: classes, but you'll
find some issues e.g. std::condition_var_any looks as if it can work
with a mutex that you provide, but actually it still relies on its own
default mutex (e.g. POSIX) being available internally.

- Make your classes inter-operate with thread cancellation /
interruption. This is only an issue if you have any sort of
cancellation in the first place, of course....

- Make other bits of Boost use your classes (e.g. the shared_ptr atomic
reference count). I think that this also requires that you add a set
of #if blocks in each case.

Is there anything else that you have in mind?


Unsubscribe & other changes:

NOTE: This message was trained as non-spam.  If this is wrong,
please correct the training as soon as possible.
Teach CanIt if this mail (ID 10434284) is spam:
Not spam:
Forget vote:

Boost list run by bdawes at, gregod at, cpdaniel at, john at