← Back to team overview

kicad-developers team mailing list archive

Re: KiCad Coroutines

 

On Thu, Jan 07, 2016 at 12:29:17PM +0100, Kristian Nielsen wrote:
> In my experience, it is important not to underestimate the value of
> co-routines for larger event-driven systems / state machines. Small systems

The Knuth book has one *huge* chapter for coroutines. In assembly. The
target has no stack so there is no problem in context switching :P

If you don't need to actively multiprocess they have the *huge*
advantage of not needing synchronization. Alternatives are of course
state machines or continuation passing, for some problem areas are even
better than linear flow....

> Unfortunately co-routines are not familiar to many developers, and have poor
> cross-platform support, which makes them harder to use.

Mostly because none of the mainstream languages uses them... the most
similar thing to them AFAIK are scheme continuation and LUA threads; and
of course Haskell monads (more or less...) in a horribly different way :D

And, of course, *every* embedded system with a cooperative scheduler at
a yield point!

-- 
Lorenzo Marcantonio
CZ Srl - Parma

Attachment: signature.asc
Description: PGP signature


References