Boost logo

Boost Users :

From: Brian (bneal_at_[hidden])
Date: 2002-09-21 14:22:23


Thank you boost developers for your great work. I've already started
using some smart_ptr's, regex, and the any type.

I started to look at shared_ptr for my needs (working in a realtime
embedded systems environment). I started wondering how it protects
its reference count but was surprised to not see anything about this
in the documentation. Examining the code I see it uses a platform
specific mutex type mechanism if it is available. Otherwise the
reference count is not thread safe. I was also alarmed to see that
the #error "your reference count is not thread safe" was commented
out!

Just a suggestion: mention in the documentation whats going on here.
The operating system I am using (VxWorks) is not supported by
shared_count right now, and had I not been curious I would have not
noticed this. Also, even if it was, it can be very expensive for a
realtime embedded system (e.g. running on a very slow processor) to
take a mutex, especially if done at a very high rate, which is a
concern of mine in a few places in my code.

BTW, can I submit a VxWorks version of shared_count? Does boost have
an interest in expanding beyond Win32/Posix/Linux?

Again, thanks for the great software,

Brian Neal


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net