
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! Andrew -----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Phil Endecott Sent: Thursday, December 20, 2007 7:15 PM To: boost@lists.boost.org 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 own native implementation of mutexes etc. and it doesn't seem like there is 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? Phil. _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost -- BEGIN-ANTISPAM-VOTING-LINKS ------------------------------------------------------ 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: Spam: http://mail-gw.cognex.com/canit/b.php?c=s&i=10434284&m=28ad193869cd Not spam: http://mail-gw.cognex.com/canit/b.php?c=n&i=10434284&m=28ad193869cd Forget vote: http://mail-gw.cognex.com/canit/b.php?c=f&i=10434284&m=28ad193869cd ------------------------------------------------------ END-ANTISPAM-VOTING-LINKS