Async or event library

Dicebot via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri May 6 04:21:40 PDT 2016


On Thursday, 5 May 2016 at 09:21:04 UTC, rikki cattermole wrote:
> Event loops needs to be thread local not per process.
> So many API's such as WinAPI for e.g. GUI's have this 
> requirement in it that its just not worth fighting over.

It is implementation detail. You can have global event loop and 
internally distribute work between per-thread event loops - only 
event callbacks defined within existing task need to be bound to 
same worker thread. From the developer convenience PoV scheduler 
/ event loop abstraction has to be process-global, I wouldn't 
consider anything else.


More information about the Digitalmars-d-learn mailing list