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: 4374 Reporter: Vassili Karpov Status: closed (set by @xavierleroy on 2007-10-25T08:37:29Z) Resolution: fixed Priority: normal Severity: minor Version: 3.10.0 Category: ~DO NOT USE (was: OCaml general) Related to:#4166
Bug description
Apparently if module A uses only external functions originating from module B,
no top level expressions from B will be evaluated (before those in A).
For instance:
thr.ml:
(let d () = Thread.delay;;)
let _ =
print_int (Thread.id (Thread.self ()))
;;
Original bug ID: 4374
Reporter: Vassili Karpov
Status: closed (set by @xavierleroy on 2007-10-25T08:37:29Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 3.10.0
Category: ~DO NOT USE (was: OCaml general)
Related to: #4166
Bug description
Apparently if module A uses only external functions originating from module B,
no top level expressions from B will be evaluated (before those in A).
For instance:
thr.ml:
(let d () = Thread.delay;;)
let _ =
print_int (Thread.id (Thread.self ()))
;;
thr$ ocaml -I +threads unix.cma threads.cma thr.ml
0
thr$ ocamlc -thread threads.cma thr.ml
thr$ ./a.out
Fatal error: exception Invalid_argument("Thread.self: not initialized")
As seen here ocamlc does not even think that thr.ml depends on unix.cma.
Uncommenting first line of thr.ml "solves" the problem.
Additional information
http://caml.inria.fr/pub/ml-archives/caml-list/2005/04/71238550c70f9f010076c06898f8a840.en.html
The text was updated successfully, but these errors were encountered: