Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Thread.delay afraid of SIGTERM
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Daniel_Bünzli <daniel.buenzli@e...>
Subject: Re: [Caml-list] Thread.delay afraid of SIGTERM

>From :

val delay : float -> unit
This primitive is provided for portability with vm-level threads, but
delay s is simply an abbreviation for ignore ( [] [] [] s).
This call, unlike join, is not restarted when it is interrupted by a

So the error you see here is Unix.EINTR: the call to select in delay
is interrupted by your signal. For more information about Unix.EINTR :

As for the difference with Unix.sleep, the latter does not raise EINTR
on signal interruption it just returns earlier with the unslept amount
(which is not reported in OCaml), see sleep(3).