I tried to use Mutex module, such as Mutex.create(), but compiler says Unbound module Mutex. Does it require some special namespace? Thanks
Asked
Active
Viewed 1,290 times
1 Answers
9
For toplevel:
ocaml -I +threads
# #load "unix.cma";;
# #load "threads.cma";;
# Mutex.create ();;
- : Mutex.t = <abstr>
For ocamlc:
ocamlc -thread unix.cma threads.cma src.ml
For ocamlopt:
ocamlopt -thread unix.cmxa threads.cmxa src.ml
For findlib:
ocamlfind ocamlc -thread -package threads -linkpkg src.ml

barti_ddu
- 10,179
- 1
- 45
- 53