Skip to content
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

gc alarm #8238

Closed
vicuna opened this issue Aug 4, 2003 · 1 comment
Closed

gc alarm #8238

vicuna opened this issue Aug 4, 2003 · 1 comment
Labels

Comments

@vicuna
Copy link

vicuna commented Aug 4, 2003

Original bug ID: 1786
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)

Bug description

Full_Name: Winfried Dreckmann
Version: OCaml 3.06
OS: Linux PowerPC
Submission from: t2o902p68.telia.com (212.181.191.68)

The function Gc.delete_alarm doesn't work:

    Objective Caml version 3.06

let a = Gc.create_alarm (fun () -> print_string "alarm\n");;

val a : Gc.alarm =

Gc.major ();;

alarm

  • : unit = ()

Gc.delete_alarm a;;

  • : unit = ()

Gc.major ();;

alarm

  • : unit = ()

This is the source code for "create_alarm" in "gc.ml":

let create_alarm f =
let a = ref true in
let arec = { active = ref true; f = f } in
finalise call_alarm arec;
a
;;

Shouldn't this be "active = a" in the third line?

Regards,
Winfried Dreckmann

@vicuna
Copy link
Author

vicuna commented Aug 7, 2003

Comment author: administrator

The function Gc.delete_alarm doesn't work:
[...]
Shouldn't this be "active = a" in the third line?

You are perfectly right. This is now fixed in the working version.

Thanks for your bug report,

-- Damien

@vicuna vicuna closed this as completed Aug 14, 2003
@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant