← Back to team overview

kicad-developers team mailing list archive

Re: KiCad Coroutines

 

Lorenzo Marcantonio <l.marcantonio@xxxxxxxxxxxxx> writes:

> OTOH I never did that on Win32/64 so maybe it's totally undependable to work :D
> Isn't there some MSDN article on doing that?

On windows, fibers can be used, and seem to work well. On most other
platforms, ucontext can be used (only exception I am aware of is that it was
removed on (some of the?) BSDs).

In the MariaDB non-blocking client library, ucontext and windows fibers are
used (and some custom assembly for performance, but that should be
unnecessary for KiCAD, I think). It seems to cover most things.

I would be happy to help with Co-routine infrastructure in KiCAD. Still, it
would be preferable if some existing layer on top (like Boost::Context or
similar) can be used, to not have to maintain KiCAD's own implementation.

> Simple?!? Well, maybe implementing but maintaining is another thing...

I agree. The main point of using co-routines in the first place is to
maintain the state of the stack across waiting operations.

 - Kristian.


References