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
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: 2005-12-28 (09:53)
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.