diff options
author | Ben Shteinfeld <ben.shteinfeld@mongodb.com> | 2017-07-13 12:23:23 -0400 |
---|---|---|
committer | Ben Shteinfeld <ben.shteinfeld@mongodb.com> | 2017-07-13 12:23:23 -0400 |
commit | d8dbf8b653f9a12b059cd29ef7ca7190272d880f (patch) | |
tree | 373e0443740428acfd5df26deb09faeae9d34498 /src/mongo/db/service_context.cpp | |
parent | a8b0a95eda28a6fbeb87fb347ec3449ce8eb3683 (diff) | |
download | mongo-d8dbf8b653f9a12b059cd29ef7ca7190272d880f.tar.gz |
Revert "SERVER-29720 Provide libmongodbcapi database wrapper for service context"
This reverts commit f7f3946600e6a5c6612ba6763ca91d93b5a023f7.
Diffstat (limited to 'src/mongo/db/service_context.cpp')
-rw-r--r-- | src/mongo/db/service_context.cpp | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/src/mongo/db/service_context.cpp b/src/mongo/db/service_context.cpp index 72ef69afee8..f4083be9901 100644 --- a/src/mongo/db/service_context.cpp +++ b/src/mongo/db/service_context.cpp @@ -46,8 +46,6 @@ namespace mongo { namespace { ServiceContext* globalServiceContext = nullptr; -stdx::mutex globalServiceContextMutex; -stdx::condition_variable globalServiceContextCV; } // namespace @@ -60,24 +58,11 @@ ServiceContext* getGlobalServiceContext() { return globalServiceContext; } -ServiceContext* waitAndGetGlobalServiceContext() { - stdx::unique_lock<stdx::mutex> lk(globalServiceContextMutex); - globalServiceContextCV.wait(lk, [] { return globalServiceContext; }); - fassert(40549, globalServiceContext); - return globalServiceContext; -} - void setGlobalServiceContext(std::unique_ptr<ServiceContext>&& serviceContext) { fassert(17509, serviceContext.get()); delete globalServiceContext; - stdx::lock_guard<stdx::mutex> lk(globalServiceContextMutex); - - if (!globalServiceContext) { - globalServiceContextCV.notify_all(); - } - globalServiceContext = serviceContext.release(); } |