Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006434OCamlOCaml runtime systempublic2014-05-20 02:022014-07-22 15:42
Reporterwhitequark 
Assigned Todoligez 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusassignedResolutionopen 
PlatformOSOS Version
Product Version 
Target Version4.03.0+devFixed in Version 
Summary0006434: caml_final_release is not declared in finalise.h
DescriptionShould be clear from subject.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0011531)
doligez (administrator)
2014-05-21 16:31

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?
(0011537)
whitequark (developer)
2014-05-21 18:38

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?
(0011864)
doligez (administrator)
2014-07-16 18:17

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.
(0011898)
whitequark (developer)
2014-07-22 15:42

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.

- Issue History
Date Modified Username Field Change
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
2014-07-22 15:42 whitequark Note Added: 0011898


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker