Version française
Home     About     Download     Resources     Contact us    
Browse thread
Ask-if-continue wrapper?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Florian Weimer <fw@d...>
Subject: Re: [Caml-list] Ask-if-continue wrapper?
* Stephen Brackin:

> I'd like an OCaml function, which I'll call continueq, with the property
> that for any function f with argument(s) fargs,
>
> continueq f fargs tsecs defaultval
>
> starts evaluating f on fargs and lets this evaluation proceed for up to
> tsecs seconds.

Other folks call this "asynchronous transfer of control", and it is
generally thought to be a terrible mistakes once you've put it into a
language.  It leads to horrible complexities and tends to make lots of
good library code incorrect.