Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] enter/leave_blocking_section
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Fedorov Vsevolod <sevaAtWork@m...>
Subject: [Caml-list] enter/leave_blocking_section
Hello!

Is it safe to use enter_blocking_section() and leave_blocking_section()
calls from my C function like this:

void testSleep( value timev )
{
  CAMLparam1(timev);
  int time = Int_val(timev);
  enter_blocking_section();
  sleep(time);
  leave_blocking_section();
  CAMLreturn0;
}

If yes, why are they not included in installed headers?
If not, which method to use multi-threaded caml app with multi-threaded
C extensions?

In attach I included full sample.

Seva

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners