diff options
author | Sven Gothel <[email protected]> | 2021-01-07 17:37:43 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2021-01-07 17:37:43 +0100 |
commit | 066df86f8ec308cb36400bf92d828b6dab9719c9 (patch) | |
tree | bce6f334d591001eb75465d7850e64ac54e02ea9 /include/jau/cow_darray.hpp | |
parent | 39a3f5719279c4387d516e9cc5de333dcc962196 (diff) |
cow_darray: Remove now obsolete API entries: put(..)
Diffstat (limited to 'include/jau/cow_darray.hpp')
-rw-r--r-- | include/jau/cow_darray.hpp | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/include/jau/cow_darray.hpp b/include/jau/cow_darray.hpp index 44582da..1a1eee6 100644 --- a/include/jau/cow_darray.hpp +++ b/include/jau/cow_darray.hpp @@ -888,50 +888,6 @@ namespace jau { } // else throw away new_store_ref return count; } - - /** - * Thread safe value_type copy assignment to value_type at given position with bounds checking. - * <p> - * This write operation uses a mutex lock and is blocking this instances' write operations only. - * </p> - * <p> - * To mutate multiple elements, use the more efficient jau::cow_rw_iterator via begin() and end(). - * </p> - * @param i the position within this store - * @param x the value to be assigned to the object at the given position - */ - __constexpr_non_literal_atomic__ - void put(size_type i, const value_type& x) { - std::lock_guard<std::recursive_mutex> lock(mtx_write); - storage_ref_t new_store_ref = std::make_shared<storage_t>( *store_ref ); - new_store_ref->at(i) = x; - { - sc_atomic_critical sync(sync_atomic); - store_ref = std::move(new_store_ref); - } - } - - /** - * Thread safe value_type move assignment to value_type at given position with bounds checking. - * <p> - * This write operation uses a mutex lock and is blocking this instances' write operations only. - * </p> - * <p> - * To mutate multiple elements, use the more efficient jau::cow_rw_iterator via begin() and end(). - * </p> - * @param i the position within this store - * @param x the value to be assigned to the object at the given position - */ - __constexpr_non_literal_atomic__ - void put(size_type i, value_type&& x) { - std::lock_guard<std::recursive_mutex> lock(mtx_write); - storage_ref_t new_store_ref = std::make_shared<storage_t>( *store_ref ); - new_store_ref->at(i) = std::move(x); - { - sc_atomic_critical sync(sync_atomic); - store_ref = std::move(new_store_ref); - } - } }; } /* namespace jau */ |