Boost logo

Boost :

From: Alexander Terekhov (terekhov_at_[hidden])
Date: 2005-01-12 10:03:48


It would be really nice if "TR2" would provide

  enum thread_safety { unsafe, basic }; // strong aside for a moment

  template<typename numeric, thread_safety scheme_thread_safety>
  class refcount;

(or something like that) and also provide "thread-unsafe" shared_ptr
in addition to the current one with its "basic" thread-safety.

http://groups.google.de/groups?selm=3F1F26CC.4125AE8B%40web.de

Note that in the case of immutable managed objects, "use_count_.
decrement()" can be replaced by msync::none version (decrement() is a
shortcut for decrement(msync::acq, msync::rel) but increments are all
"naked"). Msync on self_count_ can be relaxed a bit as well. This can
make quite a difference in performance. (E.g. on the upcoming Xbox...
PS3 aside for a moment ;-) )

regards,
alexander.


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