Coming IO features in Tango

Ingo Oeser ioe-news at rameria.de
Tue Jul 24 15:36:00 PDT 2007


Lars Ivar Igesund wrote:

> During the second stage of development we will build a framework on top of
> the asynchronous I/O library that will be able to multiplex I/O jobs using
> Tango Fibers (i.e. lightweight or userspace threads). Each fiber waiting
> for I/O events will be suspended until the event is received, helping to
> avoid consuming excessive resources. The load from each fiber will be
> distributed among a pool of threads.

Will it be possible to globally disable that or compile a version 
without that feature and have the application not noticing that?

Reason is the that the Tango scheduler for these will NEVER be efficient
enough to do that right, since it just doesn't know enough about the system
global state to make scheduling decisions at all. Are you sure, you load 
each Core properly? Use HT properly? Schedule correctly for NUMA? Do you
solve priority inversion properly? Can you schedule correctly being 
part of distributed (operating) system? What about real time?

You'll also have much fun with unixoide systems and signals, if you do that.

What about something like jobs and job queues? 

Or even better: Support OpenMP! GCC 4.2.x has everything there already, 
and I'm sure DMD will get this one day :-)

Fibers, Greenthreads and user space threading stuff like that proved to be
a can of worms already and is only necessary, if the native thread
implementation of an OS sucks. 

For these thread challenged platforms, just provide a user space threading 
solutions deeply embedded and hidden in Tango.

Oh and one thing: Never ever start threads in a library! The garbage 
collector stuff is necessary and ok, but anything more is going to lead to
hard to debug deadlocks and priority inversions. Had fun with such an ATI 
library already :-/

Just say NO to threading stuff in your damn good library. It will make it
unusable for me.

Thanks you very much in advance!


Best Regards

Ingo Oeser



More information about the Digitalmars-d-announce mailing list