|
Boost Users : |
From: Darin Adler (darin_at_[hidden])
Date: 2002-09-22 00:40:31
On Saturday, September 21, 2002, at 12:22 PM, Brian wrote:
> Just a suggestion: mention in the documentation whats going on here.
That's a good idea. If you would be willing to contribute suggested
changes to the documentation, I'd be happy to edit them and put them in
for a coming release.
> 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.
There are a number of different choices for how to make the reference
count thread safe. We would like to have something that is efficient
and correct for each platform. Peter Dimov, who wrote shared_count,
would presumably be happy to talk to you about alternatives.
In addition, the BOOST_NO_THREADS define can be used to request that
libraries like the smart pointer library use a non-thread-safe version.
This may be practical on a system where threads exist, but the Boost
components are used in a way that doesn't require thread safety.
In addition, there is a long term goal to create some other smart
pointer class template that provides more flexibility about thread
safety and other tradeoffs.
> BTW, can I submit a VxWorks version of shared_count?
Absolutely. Such contributions are welcome. The page at
<http://boost.org/more/lib_guide.htm> talks about the requirements and
guidelines for Boost submissions.
> Does boost have an interest in expanding beyond Win32/Posix/Linux?
This is a loaded question. Boost is a collection of libraries that
works on many different platforms and is largely platform independent.
But each library in Boost is separate. Some libraries that stray beyond
what can be done with ISO Standard C++ work only on certain platforms,
and many work on only certain compilers because of compiler
deficiencies.
I think that it would be great to make shared_count thread safe rather
than ignoring threading for VxWorks, and perhaps even make Boost.Thread
work on VxWorks.
-- Darin
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