← Back to team overview

kicad-developers team mailing list archive

Re: KiCad Coroutines

 

On Thu, Jan 07, 2016 at 11:39:24AM +0100, "Torsten Hüter" wrote:

> Ideally rendering and gui handling should happen only in the main
> thread; but that would be to restrictive for our purposes.

Are we sure doing GUI calls in event handling is a good idea? Since win
3.1 the recommended way was to schedule an update and handle it in the
'preferred' event...

Also how do you do an 'incremental' opengl update? An FBO for the
current screen and then a paste over with the current modifications?

> This makes threads in my opinion unattractive for coroutines.

Threads are not free, either... I personally would be doing this with
coroutines but only scheduling the updates, this also help detach the
drawing code from the tool process/state machine (like in MVC, ideally,
the coroutine is the controller part and the paint code is the view).
Yes, I know that doing a 'pure' MVC is neither easy nor fun but in the
long time I think it would be better than interspersing drawing with the
controller.

--
Lorenzo Marcantonio
CZ Srl - Parma


References