summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-08-20 21:13:27 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-08-22 16:22:49 +0200
commit1706dba109533cce01eb982ef7cdedee5a20a1e0 (patch)
treebadce497892c71a1b81c18957e0bab148b06f7e4 /comphelper
parentc32c82e2e89e9efcd922da81918c6915829dc632 (diff)
osl::Mutex->std::mutex
Change-Id: Id3c0660dae6dd5c6c026a26ec2ca39ccd6db210f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120845 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/source/misc/asyncnotification.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/comphelper/source/misc/asyncnotification.cxx b/comphelper/source/misc/asyncnotification.cxx
index 0fd0c338af53..e498ce23ba44 100644
--- a/comphelper/source/misc/asyncnotification.cxx
+++ b/comphelper/source/misc/asyncnotification.cxx
@@ -163,9 +163,9 @@ namespace comphelper
namespace {
- osl::Mutex& GetTheNotifiersMutex()
+ std::mutex& GetTheNotifiersMutex()
{
- static osl::Mutex MUTEX;
+ static std::mutex MUTEX;
return MUTEX;
}
@@ -177,7 +177,7 @@ namespace comphelper
{
std::vector<std::weak_ptr<AsyncEventNotifierAutoJoin>> notifiers;
{
- ::osl::MutexGuard g(GetTheNotifiersMutex());
+ std::scoped_lock g(GetTheNotifiersMutex());
notifiers = g_Notifiers;
}
for (std::weak_ptr<AsyncEventNotifierAutoJoin> const& wNotifier : notifiers)
@@ -201,7 +201,7 @@ namespace comphelper
AsyncEventNotifierAutoJoin::~AsyncEventNotifierAutoJoin()
{
- ::osl::MutexGuard g(GetTheNotifiersMutex());
+ std::scoped_lock g(GetTheNotifiersMutex());
// note: this doesn't happen atomically with the refcount
// hence it's possible this deletes > 1 or 0 elements
g_Notifiers.erase(
@@ -217,7 +217,7 @@ namespace comphelper
{
std::shared_ptr<AsyncEventNotifierAutoJoin> const ret(
new AsyncEventNotifierAutoJoin(name));
- ::osl::MutexGuard g(GetTheNotifiersMutex());
+ std::scoped_lock g(GetTheNotifiersMutex());
g_Notifiers.push_back(ret);
return ret;
}