|Anonymous | Login | Signup for a new account||2016-04-30 09:14 CEST|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0006434||OCaml||OCaml runtime system||public||2014-05-20 02:02||2016-04-05 16:06|
|Priority||normal||Severity||minor||Reproducibility||have not tried|
|Status||closed||Resolution||no change required|
|Target Version||Fixed in Version|
|Summary||0006434: caml_final_release is not declared in finalise.h|
|Description||Should be clear from subject.|
|Tags||No tags attached.|
This is a primitive that you're supposed to call from OCaml, not from C, so it doesn't need to be declared in the .h. Do you have a use case for calling it from C?
I think I did, but not I'm not sure. A previous design of finalizers in ocaml-zmq was supposed to have a finalizer that doesn't terminate for a long time. But we went away from that design already.
Generally, wouldn't the use cases for calling it from C be the same as for finalizers written in OCaml?
There are two kinds of finalisers/finalizers:
Finalizers are written in C and used for custom objects.
Finalisers are written in OCaml and used with Gc.finalise.
caml_final_release is for the second kind. I suppose you might want to call it from a C primitive called by your OCaml finalisation function, but I don't see much use for that. At worst you can do it with a callback (!) or call it before you call your C primitive.
|Does caml_final_release not work with finalizers written in C? I don't see anything conceptually different between releasing the runtime from a C finalizer or OCaml finalizer.|
|A C finalizer runs in the middle of garbage collection. That's definitely not a safe point for releasing the runtime.|
|2014-05-20 02:02||whitequark||New Issue|
|2014-05-21 16:31||doligez||Note Added: 0011531|
|2014-05-21 16:31||doligez||Assigned To||=> doligez|
|2014-05-21 16:31||doligez||Status||new => feedback|
|2014-05-21 18:38||whitequark||Note Added: 0011537|
|2014-05-21 18:38||whitequark||Status||feedback => assigned|
|2014-07-16 18:17||doligez||Note Added: 0011864|
|2014-07-16 18:17||doligez||Target Version||=> 4.03.0+dev / +beta1|
|2014-07-22 15:42||whitequark||Note Added: 0011898|
|2016-04-05 16:05||doligez||Note Added: 0015677|
|2016-04-05 16:06||doligez||Status||assigned => closed|
|2016-04-05 16:06||doligez||Resolution||open => no change required|
|2016-04-05 16:06||doligez||Target Version||4.03.0+dev / +beta1 =>|
|Copyright © 2000 - 2011 MantisBT Group|