Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace IceUtil::Mutex with std::mutex #1763

Merged
merged 11 commits into from
Feb 7, 2024
Merged

Conversation

pepone
Copy link
Member

@pepone pepone commented Feb 6, 2024

This is a follow-up to #1755, replaces most of the remaining usages for IceUtil::Mutex in sources, still left:

  • Application
  • Timer

@@ -44,61 +44,10 @@ mutex staticMutex;
int instanceCount = 0;
bool initOpenSSL = false;

#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it doesn't make sense to support this older OpenSSL versions with 3.8. As per libressl I think is fine to remove this code we are not testing it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree!

@@ -8,6 +8,7 @@
#include <IceUtil/Config.h>
#include <IceUtil/Lock.h>
#include <IceUtil/Cond.h>
#include <IceUtil/Mutex.h>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still use Mutex and Monitor? If not, I would remove them entirely.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still have to fix the tests, Application and Timer classes.

@@ -44,61 +44,10 @@ mutex staticMutex;
int instanceCount = 0;
bool initOpenSSL = false;

#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree!

{
timedWait(waitTime);
if (_conditionVariable.wait_until(lock, chrono::steady_clock::now() + waitTime) == cv_status::timeout)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should revisit this code.

cpp/src/Ice/LoggerAdminI.cpp Outdated Show resolved Hide resolved
cpp/src/Ice/Service.cpp Outdated Show resolved Hide resolved
cpp/src/Ice/LoggerAdminI.cpp Outdated Show resolved Hide resolved
Copy link
Member

@InsertCreativityHere InsertCreativityHere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@pepone pepone merged commit 782c521 into zeroc-ice:main Feb 7, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants