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
[Caml-list] let rec when not recursive
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Chris Hecker <checker@d...>
Subject: Re: [Caml-list] let rec when not recursive

>the only think i could think
>of was to make it recursive, even though it isn't (because the
>sched#sched_in call returns immediately).

Here's how I did this same thing using LablTk a long time ago.  I was 
originally not removing the timer at the end of the run and tk would 
eventually freak out after a bunch of runs.

let rec timer_t = ref
     (let rec add_timer () = Timer.add ~ms:1
         ~callback:(fun () -> (try display togl with _ -> ()); timer_t := 
add_timer ()) in
     add_timer ())


Timer.remove !timer_t


To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: