On Sun, 2007-08-19 at 13:13 +0300, Rhythmic Fistman wrote:
[]

[CCing to Andreas in case he can throw more light on this]

A general note on fthreads and schannels. As Andreas
Rossberg noted on LtU (Lambda the Ultimate), Felix fthread/schannel
is a "very poor man's promise/future".

As I understand it, a nicer construction is something like this:

        var x = f(); // future
        ...
        println x;

What this does is schedule the calculation of x, but the calculation
is not forced until x is used. At the println, if x isn't calculated
yet, we suspend until it is.

The point is that the operation is transparent. This is closely
related to lazy evaluation.

In Felix, you have to:

        (a) create (two) fthread(s)
        (b) create a channel
        (c) explicitly read/write the channel

In addition, this only works with (top level) procedures.

-- 
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Felix-language mailing list
Felix-language@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to