Le Thursday 24 January 2008 13:46:49 David Baelde, vous avez écrit :
> Hi Romain,
>
> Right now this code is a loop in a separate thread, so the change is
> not trivial. But it seems to make sense. I'll let you handle that if
> you wish, when you wish: there's no hurry. 

Yep :-)

There's a simple way to do that with the duppy scheduler:

  let m = Mutex.create () in
  Mutex.lock m;
  duppy#add [`Delay d] (fun _ -> Mutex.unlock m; [])
  Mutex.lock m;

You may also use pipe for that...

What do you think ?

Romain

Répondre à