You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 793 Reporter: administrator Status: closed Resolution: not a bug Priority: normal Severity: minor Category: ~DO NOT USE (was: OCaml general)
This happens as well in the toplevel as in byte or native compiled
programs.
This is not a bug: the select system call is interrupted by
the Graphics librarie's internal use of interval timer.
The quick workaround is as follows, (though it is not so presice):
let sleep sec =
let start = Unix.gettimeofday () in
let rec delay t =
try Unix.Unix_error(Unix.EINTR, _, _) ->
let now = Unix.gettimeofday () in
let remaining = start +. n -. now in
if remaining > 0.0 then delay remaining
in
delay sec
;;
Original bug ID: 793
Reporter: administrator
Status: closed
Resolution: not a bug
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: Luc Habert
Version: 3.04
OS: Linux
Submission from: gargamel.ens.fr (129.199.131.138)
I am experiencing a problem when using Unix.select while the graphics
window is open :
#load "unix.cma";;
#load "graphics.cma";;
Graphics.open_graph "";;
Unix.select [] [] [] 1.;;
Exception: Unix.Unix_error (Unix.EINTR, "select", "").
This happens as well in the toplevel as in byte or native compiled
programs.
The text was updated successfully, but these errors were encountered: