* [Caml-list] enter/leave_blocking_section
@ 2003-06-27 12:30 Fedorov Vsevolod
2003-07-01 7:53 ` Xavier Leroy
0 siblings, 1 reply; 2+ messages in thread
From: Fedorov Vsevolod @ 2003-06-27 12:30 UTC (permalink / raw)
To: caml-list
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Caml-list] enter/leave_blocking_section
2003-06-27 12:30 [Caml-list] enter/leave_blocking_section Fedorov Vsevolod
@ 2003-07-01 7:53 ` Xavier Leroy
0 siblings, 0 replies; 2+ messages in thread
From: Xavier Leroy @ 2003-07-01 7:53 UTC (permalink / raw)
To: Fedorov Vsevolod; +Cc: caml-list
> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-07-01 7:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-27 12:30 [Caml-list] enter/leave_blocking_section Fedorov Vsevolod
2003-07-01 7:53 ` Xavier Leroy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox