Boost logo

Boost :

From: bill_kempf (williamkempf_at_[hidden])
Date: 2002-02-18 10:06:04


--- In boost_at_y..., "Peter Dimov" <pdimov_at_m...> wrote:
> I have added two more shared_ptr tests in libs/smart_ptr.
>
> shared_ptr_timing_test.cpp can be used to evaluate the performance
of the
> thread safe implementation relative to the single-threaded baseline
> (-DBOOST_DISABLE_THREADS disables shared_ptr thread safety.)
>
> shared_ptr_mt_test.cpp tests the thread safety. Currently it passes
for me
> on MSVC 7 and Borland 5.5.1 on Windows and g++ 2.96 on Linux (both
machines
> have a single processor, though.) Unfortunately I get strange
errors with
> g++/mingw on Windows; when I force shared_ptr to use a
CRITICAL_SECTION
> via -DBOOST_LWM_WIN32_USE_CRITICAL_SECTION, the problems go away,
leading me
> to think that the InterlockedExchange "optimized" mutex is either a
bit
> overoptimized, or I've done something wrong.
>
> Any insights, or results from multiprocessor machines or different
> compilers, are appreciated.

Have you included the proper compile flags? I believe mingw
requires -mthread (and the Jam rules currently don't do this).

Bill Kempf


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk