On 15 October 2010 16:57, john skaller <skal...@users.sourceforge.net> wrote:
>
> On 15/10/2010, at 2:16 AM, Rhythmic Fistman wrote:
>
>>> From: john skaller <skal...@users.sourceforge.net>
>>
>>> I have finally got the webserver to work. Unsurprisingly there were NO bugs 
>>> in any
>>> of the C++ library code!
>>
>> Woohoo!
>>
>>> RF also ran into this problem with closures.
>>
>> Yes, I often had separate fthreads magically sharing local variables.
>
> It's a bug, I'll have to fix it. However as noted what it does now is 
> necessary most

I also had some unclearness when I modified variables "above" the
fthread's closure (?).
Apple's "block" implementation makes outer variables read only, but fthreads are
often synchronous (that's why I use them), so modification can work.

> of the time for performance, it isn't so easy to decide when the current 
> optimisation
> is wrong.
>
> In a case like:
>
> fun f(var x:int) {
>  fun g()=> x + x;
>  return g;
> }
>
> var a = 1;
> var k = f a;
> ++a;
> var r = k();
>
> we expect 2 not 4 as the result.
>
>> I'll add node.js to Erick's mongrel - it's interesting looking. Also I'm 
>> using
>> tornado (a python library) for a web server. It's going to get hammered
>> pretty hard in a few weeks, so we'll see how that goes. Tornado is basically
>> a "demuxer" (why did I call them that?)
>
> Because the os multiplexes asynchronous events into a queue, and your code
> takes the queue and unserialises it into interleaved thread execution.. :)

Ah!

>> with a well wrapped lib curl. It's nice
>> to use, but it's still callback/event driven programming. Someone has hooked
>> it up to python generators (continuations?). Also, being python it's
>> single threaded - it seems
>> most folk just fork and hook it up a load balancer (nginx).
>
>
> Well Felix fthread are also running on a single CPU..

That's right, but tornado/python only offers you one logical thread, so you're
still passing your local variables from step to step.


>
> --
> john skaller
> skal...@users.sourceforge.net
>
>
>
>
>

------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly 
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
_______________________________________________
Felix-language mailing list
Felix-language@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to