|Anonymous | Login | Signup for a new account||2015-01-31 20:14 CET|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0006048||OCaml||OCaml documentation||public||2013-06-23 06:17||2013-06-24 10:04|
|Status||resolved||Resolution||no change required|
|Target Version||Fixed in Version|
|Summary||0006048: It is not documented what happens when you nest caml_acquire_runtime_system()|
|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.
|Tags||No tags attached.|
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.
|2013-06-23 06:17||sesquized||New Issue|
|2013-06-24 10:04||xleroy||Note Added: 0009605|
|2013-06-24 10:04||xleroy||Status||new => resolved|
|2013-06-24 10:04||xleroy||Resolution||open => no change required|
|Copyright © 2000 - 2011 MantisBT Group|