[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2010-01-09 (19:36) |
From: | Guillaume Yziquel <guillaume.yziquel@c...> |
Subject: | Re: [Caml-list] problem creating .cma library |
Daniel Bünzli a écrit : > Section 2) of this paper also has a very gentle and readable > introduction to the gc : > > http://portal.acm.org/citation.cfm?id=141130 Thanks for the link. > Another thing you need to know, if you have long running pieces of C > code that don't interact with ocaml's runtime system, is the two > functions : > > caml_enter_blocking_section > caml_leave_blocking_section > > They are explained in this message : > > http://caml.inria.fr/pub/ml-archives/caml-list/2001/06/58d7a7e8747056c3842e53b4e9454f44.en.html OK. So if I want to call R code that multithreads with OCaml, I should write something like > enter_blocking_section(); > PROTECT(e = R_tryEval(Sexp_val(sexp_list), R_GlobalEnv, &error)); > UNPROTECT(1); > leave_blocking_section(); Am I correct? -- Guillaume Yziquel http://yziquel.homelinux.org/