-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Root Lockguard #9294
Comments
I noticed that in one computer, _REENTRANT is defined, but not in the other, not sure why, even if they are both Ubuntu. So my original code only worked if _REENTRANT was undefined, so maybe it wasn't doing anything at all? I don't remember however having seen any warning Some other questions:
|
I am not sure who can look at this. I assigned it to @Axel-Naumann for the time being. |
Because ROOT traditionally passes pointers. You are welcome to propose a PR, I think this would be a fine and minimal addition. It might be more useful to make sure that the argument is a pointer to a
Please just provide
You want to pass
That's an excellent question to which I do not have an authoritative answer. My assumption is that Let me know if there is something left for us to do to fix this issue! |
In addition to what @Axel-Naumann mentioned, ROOT supports a run-time switch where no lock is taken ('thread safety is not enabled') and this is indicated by the pointer being |
Describe the bug
I've been using in my programs these constructs:
(In analogy with https://en.cppreference.com/w/cpp/thread/lock_guard)
Somehow, in one of my computers (not in the other, not sure if it is related with an update I did in ROOT or something similar), I get a compilation error. This error didn't appear before.
Expected behavior
No error is produced as before.
Or why are the others compiling well ?
Should I change instead to R__LOCKGUARD(&myMutex); ?
If yes, could this be added into the documentation ? Right now, it is not specified if it has to be a pointer or not.
To reproduce
Setup
The text was updated successfully, but these errors were encountered: