Async or event library

chmike via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu May 5 01:19:26 PDT 2016


Hello I have seen the wiki page 
https://wiki.dlang.org/Event_system and would like to know the 
current status. Is there a working group for this subject ? This 
is a topic I'm interested in and did some modest work on some 
years ago.

At the bottom of the wiki page there is an innocent question 
regarding TLS which is quite devastating. A worker thread pool 
system would not support affinity between threads and callback 
context. Unfortunately, D relies on Thread Local Storage for semi 
global data. This would be error prone. I saw such error case 
with people using TLS with Corba.

One way out of this apparent deadlock is if D would provide its 
own TLS that can be switched between threads. This would allow to 
preserve affinity between threads and callback execution context. 
Unfortunately, it would introduce an overhead to access the data 
in the local storage due to the required indirection. It would 
also require that the compiler is adapted.

When fibers and multithreading support is built in the language, 
as in Go, the compiler can do the magic.

I would like to underline that the server side of software 
development is the easiset side to conquer because the client 
side as to many different GUIs and execution contexts. But it 
requieres that the performances are on par with other languages 
like C, C++, Go or Java.




More information about the Digitalmars-d-learn mailing list