N3862: Towards a Transaction-safe C++ Standard Library: std::list -- Gottschlich, Spear, Wong et al.

A new WG21 paper is available. A copy is linked below, and the paper will also appear in the next normal WG21 mailing. If you are not a committee member, please use the comments section below or the std-proposals forum for public discussion.

Document number: N3862

Date: 2014-01-20

Towards a Transaction-safe C++ Standard Library: std::list

by Justin Gottschlich, Michael Spear, Michael Wong, et al.

Excerpt:

This paper documents our effort to transactionalize a C++ Standard Template Library (STL) container to demonstrate the feasibility of the transactional language constructs proposed by Study Group 5 (SG5): Transactional Memory. We began this study with std::list and made it transaction-safe using the transactional memory support in GCC 4.9. The changes were minimal and were generally restricted to the addition of transaction_safe keyword to a few interfaces such as allocate, deallocate, and swap functions. The rest of the changes were added to internal helper functions. Some of the issues that we considered were the constant time complexity of std::list.size() and friends, and its const noexcept nature. This experience shows that the safety of STL containers must not be specified directly, but instead should be inherited from the type with which the container is instantiated. For our future work, we plan to expand this effort to other STL containers as well as converting the clang/llvm C++ library.

Add a Comment

Comments are closed.

Comments (0)

There are currently no comments on this entry.