Am Donnerstag, den 27.10.2011, 15:10 -0400 schrieb Milan Stanojević:
> > You probably mean the case where x has already computed a result.
> 
> Yes.
> 
> >
> > When developing Uq_engines, I was a bit unsure how to treat this case.
> > In the initial version, I just disallowed this case: There was simply no
> > way to run into it. If you wanted to create a thread that just yields a
> 
> In Async and Lwt I think it quite possible to have this case even if x
> was not just giving you a constant value. For example, x could be
> read_char (), and if you have buffered input (like Async does, and
> probably Lwt) it is quite possible that read_char will be determined
> immediately (since there is no need to issue a system call)

Right, if functions like read_char are considered as primitives, you can
have that. In Equeue e.g. Uq_io.really_input_e isn't a primitive, but
just something built on top of input_e, and if it reads from the buffer,
the value is returned via eps_e.

So, it depends a bit on the design which functions show this phenomenon.

Gerd
-- 
------------------------------------------------------------
Gerd Stolpmann, Darmstadt, Germany    g...@gerd-stolpmann.de
Creator of GODI and camlcity.org.
Contact details:        http://www.camlcity.org/contact.html
Company homepage:       http://www.gerd-stolpmann.de
*** Searching for new projects! Need consulting for system
*** programming in Ocaml? Gerd Stolpmann can help you.
------------------------------------------------------------



-- 
Caml-list mailing list.  Subscription management and archives:
https://sympa-roc.inria.fr/wws/info/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Reply via email to