On 02/03/2014, at 7:56 AM, john skaller wrote:

> ok so the breaking in the networking test is because of the
> changed semantics.

Actually, a deadlock occurred in the async scheduler,
trying to block and pull ALL the pending requests of the
ready queue .. unfortunately one of those fthreads had
to run to service the other to make it ready, 
resulting in a deadlock.

So now I just process one at a time.

Also note there is a new library function:

        schedule_fthread 

like

        spawn_fthread

except spawn always calls the fthread immediately,
whereas schedule continues the caller instead.
Technically this means schannel/fibre operation
without async I/O etc is fully deterministic.
(schannel readers always resume before writers).

This determinism is irrelevant in functional code,
it only matters in code the modifies state (variables
or environment).

Now, with the new scheduler it is a lot more modular.
So it may be possible to launch a scheduler in a function
allowing functions to call procedures doing channel I/O.

I have to look at the performance issues. Felix can't tell
if a procedure does channel I/O at the moment, it assumes
ones called from functions don't, and generates a trivial
driver like

        while (p) p = p->resume();

This is sane in the sense that procedures can't do channel I/O,
only fibres can do that. But any procedure can be converted
to a fibre, and the actual I/O is done with a service call in
the procedure. It's not clear the distinction would be well supported
by the type system (eg call procedures doing channel I/O fibres instead).


--
john skaller
skal...@users.sourceforge.net
http://felix-lang.org




------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
Felix-language mailing list
Felix-language@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to