summaryrefslogtreecommitdiff
path: root/src/mongo/idl
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/idl')
-rw-r--r--src/mongo/idl/server_parameter_with_storage.h8
-rw-r--r--src/mongo/idl/server_parameter_with_storage_test.cpp8
-rw-r--r--src/mongo/idl/server_parameter_with_storage_test.idl2
3 files changed, 9 insertions, 9 deletions
diff --git a/src/mongo/idl/server_parameter_with_storage.h b/src/mongo/idl/server_parameter_with_storage.h
index f7450a13e77..514942e0502 100644
--- a/src/mongo/idl/server_parameter_with_storage.h
+++ b/src/mongo/idl/server_parameter_with_storage.h
@@ -35,7 +35,6 @@
* rather parameters should be defined in .idl files.
*/
-#include <boost/thread/synchronized_value.hpp>
#include <functional>
#include <string>
@@ -44,6 +43,7 @@
#include "mongo/bson/bsonelement.h"
#include "mongo/bson/bsonobjbuilder.h"
#include "mongo/db/server_parameters.h"
+#include "mongo/util/synchronized_value.h"
namespace mongo {
namespace idl_server_parameter_detail {
@@ -146,13 +146,13 @@ struct storage_wrapper<AtomicProxy<U, P>> {
};
template <typename U>
-struct storage_wrapper<boost::synchronized_value<U>> {
+struct storage_wrapper<synchronized_value<U>> {
static constexpr bool thread_safe = true;
using type = U;
- static void store(boost::synchronized_value<U>& storage, const U& value) {
+ static void store(synchronized_value<U>& storage, const U& value) {
*storage = value;
}
- static U load(const boost::synchronized_value<U>& storage) {
+ static U load(const synchronized_value<U>& storage) {
return *storage;
}
};
diff --git a/src/mongo/idl/server_parameter_with_storage_test.cpp b/src/mongo/idl/server_parameter_with_storage_test.cpp
index 0e04264f272..63805f9ae31 100644
--- a/src/mongo/idl/server_parameter_with_storage_test.cpp
+++ b/src/mongo/idl/server_parameter_with_storage_test.cpp
@@ -123,11 +123,11 @@ template <typename T>
void doStorageTestByType(const std::string& name,
const std::vector<std::string>& valid,
const std::vector<std::string>& invalid) {
- using BSV = boost::synchronized_value<T>;
+ using SV = synchronized_value<T>;
doStorageTest<T, SPT::kStartupOnly>("Startup" + name, valid, invalid);
- doStorageTest<BSV, SPT::kStartupOnly>("BoostStartup" + name, valid, invalid);
- doStorageTest<BSV, SPT::kRuntimeOnly>("Runtime" + name, valid, invalid);
- doStorageTest<BSV, SPT::kStartupAndRuntime>("StartupAndRuntime" + name, valid, invalid);
+ doStorageTest<SV, SPT::kStartupOnly>("BoostStartup" + name, valid, invalid);
+ doStorageTest<SV, SPT::kRuntimeOnly>("Runtime" + name, valid, invalid);
+ doStorageTest<SV, SPT::kStartupAndRuntime>("StartupAndRuntime" + name, valid, invalid);
}
template <typename T>
diff --git a/src/mongo/idl/server_parameter_with_storage_test.idl b/src/mongo/idl/server_parameter_with_storage_test.idl
index f668273c63c..aed125115c3 100644
--- a/src/mongo/idl/server_parameter_with_storage_test.idl
+++ b/src/mongo/idl/server_parameter_with_storage_test.idl
@@ -64,6 +64,6 @@ server_parameters:
runtimeBoostDouble:
set_at: runtime
description: "Create a runtime-only string, using boost::synchronized_value"
- cpp_vartype: "boost::synchronized_value<double>"
+ cpp_vartype: "synchronized_value<double>"
cpp_varname: gRuntimeBoostDouble