[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ 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 ())
in
blah..
Timer.remove !timer_t
Chris
-------------------
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