Hello all,

In that case, take a look at http://dunkels.com/adam/pt/examples.html for
inspiration. (proto-threads)

Greetings,
Edwin van den Oetelaar

On Thu, Jan 7, 2016 at 1:39 PM, Lorenzo Marcantonio <
l.marcanto...@cz-dynamic.it> wrote:

> On Thu, Jan 07, 2016 at 01:24:18PM +0100, Edwin van den Oetelaar wrote:
> > I have done some embedded work in which these cooperative concepts
> happened.
>
> > by using co-routines this way you gain perceived concurrency but no real
> > increased power.
>
> It's not done for concurrency, only for flow control. Otherwise it would
> be a thread, not a coroutine :D
>
> When a coroutine stops only another one resumes, i.e. you manually and
> explicitly jump between threads of execution. Moreover you have full
> control of *which* coroutine pass to the CPU; it's a fundamentally
> different thing.
>
> - Threads: many control flows, everyone run in parallel. If infinite
>   cores are not available, scheduling is done by the OS in marginally
>   controllable way (except with synchronization)
>
> - Coroutine: many control flows, only one runs at a time and then
>   suspend to pass the control to the desired one; no synchronization
>   needed since only one is in control at any time
>
> --
> Lorenzo Marcantonio
> CZ Srl - Parma
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>
>
_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to     : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp

Reply via email to