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: Xavier Leroy <xavier.leroy@i...>
Subject: Re: [Caml-list] enter/leave_blocking_section
> 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;
> }

Yes, that's the intended usage.

> If yes, why are they not included in installed headers?

Oversight.  The development version now installs <caml/signals.h>
that declares {enter,leave}_blocking_section.

- Xavier Leroy

-------------------
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