From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id TAA27437; Thu, 24 Apr 2003 19:53:04 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id TAA22522 for ; Thu, 24 Apr 2003 19:53:03 +0200 (MET DST) Received: from relay.pair.com (relay.pair.com [209.68.1.20]) by nez-perce.inria.fr (8.11.1/8.11.1) with SMTP id h3OHr1T05751 for ; Thu, 24 Apr 2003 19:53:02 +0200 (MET DST) Received: (qmail 10546 invoked from network); 24 Apr 2003 17:52:59 -0000 Received: from arda.pair.com (HELO compaqreview.d6.com) (209.68.1.133) by relay.pair.com with SMTP; 24 Apr 2003 17:52:59 -0000 X-pair-Authenticated: 209.68.1.133 Message-Id: <4.3.2.7.2.20030424104500.03c98408@localhost> X-Sender: checker@localhost X-Mailer: QUALCOMM Windows Eudora Version 4.3.2 Date: Thu, 24 Apr 2003 10:47:41 -0700 To: Henri DF , caml-list@inria.fr From: Chris Hecker Subject: Re: [Caml-list] let rec when not recursive In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Spam: no; 0.00; hecker:01 checker:01 caml-list:01 sched:01 labltk:01 callback:01 togl:01 chris:01 blah:01 rec:01 recursive:03 bunch:03 let:04 timer:05 runs:07 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk >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