Async or event library

rikki cattermole via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri May 6 04:43:47 PDT 2016


Me and Dicebot have just had a quick conversion on IRC about this.
To recap, I'm talking about event loops for windowing.
For an event loop for e.g. socket based systems like Vibe.d it is a 
different story.

For windowing you have the limitation of having to be on the same thread 
as the one that created the window. You just can't do anything, drawing 
a window even processing the event itself can't be done from another thread.

Where as with a socket based event loop you expect other threads to 
handle it.

So basically you've got to make the event loop implementation be 
separated out into a per thread and per process aware.
Most importantly if you do e.g. windowing you must activate the per 
thread event loop.

This is not an easy topic to discuss or solve sadly.


More information about the Digitalmars-d-learn mailing list