From 816d8e6723c7272f2df0ff9e614f8a0fe19f66c9 Mon Sep 17 00:00:00 2001 From: Enrico Tassi Date: Mon, 21 Jan 2019 13:46:31 +0100 Subject: [thread] protect threads against sigalrm This makes the implementation of Timeout on unix more reliable since only the main thread will receive the signal for timeout. --- clib/cThread.mli | 3 +++ 1 file changed, 3 insertions(+) (limited to 'clib/cThread.mli') diff --git a/clib/cThread.mli b/clib/cThread.mli index acc5a60c09..b090479c4c 100644 --- a/clib/cThread.mli +++ b/clib/cThread.mli @@ -26,3 +26,6 @@ val thread_friendly_really_read : thread_ic -> Bytes.t -> off:int -> len:int -> unit val thread_friendly_really_read_line : thread_ic -> string +(* Wrapper around Thread.create that blocks signals such as Sys.sigalrm (used + * for Timeout *) +val create : ('a -> 'b) -> 'a -> Thread.t -- cgit v1.2.3