Async or event library

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


On 06/05/2016 11:21 PM, Dicebot wrote:
> 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.

If you do it per process, it sounds rather messy with synchronization ext.


More information about the Digitalmars-d-learn mailing list