From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2007-10-19 17:50:31


Dave Jenkins escribió:
> "Ion Gaztañaga" <igaztanaga_at_[hidden]> wrote in message
> news:4717AEEC.1030607_at_gmail.com...
> Splaying performed would break usual de-facto thread-safety guarantees
> for STL and
> Intrusive containers (read-only access from different threads is
> thread-safe).
>
>
> We had the same worry about thread-safety on the self-adjusting trie in
> xpressive (xpressive/detail/utility/symbols.hpp). Rather than remove
> the self-adjusting optimization, we decided to enable it conditionally
> when BOOST_DISABLE_THREADS is defined and exclude it otherwise.

Ummm.. IMHO this option is surely safe but many times alibrary is
compiled as multithreaded even if only a thread is used. Apart from
that, having threading enabled does not mean that containers will be
shared between threads (we can have a GUI and the backend thread).

Sadly, a splay tree that does not splay on searches, is no longer a
splay tree and will have quite bad performance. You didn't have any
noticeable performance impact when multithreaded was enabled?

Regards,

Ion