You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 6048 Reporter: sesquized Status: closed (set by @xavierleroy on 2015-12-11T18:19:57Z) Resolution: not a bug Priority: normal Severity: minor Category: documentation
Bug description
The section 19.10.1 of the manual describes the caml_acquire_runtime_system() and caml_release_runtime_system().
I don't see where the text addresses what happens if you call acquire more than once from the same thread.
I looked at the Windows code and it appeared that you just need to match the number of releases to the number of acquires and you can acquire the lock more than once safely. (But I'm not certain and don't know if it's true for other OSs/build environments.)
It would be good if the topic was explained specifically.
The text was updated successfully, but these errors were encountered:
The behavior is very much unspecified: under Windows, it might work because the master lock is reentrant, but under POSIX systems it is very likely to deadlock at the second caml_release_runtime_system(). So, don't do that.
Original bug ID: 6048
Reporter: sesquized
Status: closed (set by @xavierleroy on 2015-12-11T18:19:57Z)
Resolution: not a bug
Priority: normal
Severity: minor
Category: documentation
Bug description
The section 19.10.1 of the manual describes the caml_acquire_runtime_system() and caml_release_runtime_system().
I don't see where the text addresses what happens if you call acquire more than once from the same thread.
I looked at the Windows code and it appeared that you just need to match the number of releases to the number of acquires and you can acquire the lock more than once safely. (But I'm not certain and don't know if it's true for other OSs/build environments.)
It would be good if the topic was explained specifically.
The text was updated successfully, but these errors were encountered: