DMD 1.022 and 2.005 releases - what's wrong with threading?

Sean Kelly sean at f4.ca
Sun Oct 7 09:50:09 PDT 2007


downs wrote:
> Walter Bright wrote:
>> Sean Kelly wrote:
>>> For what it's worth, Tango will never choose to run exclusively on the
>>> Phobos runtime.  One of the primary reasons many people choose Tango
>>> is for its threading package, and this is a runtime feature. 
>>> Therefore, dropping this package to use the Phobos version would be
>>> foolish, and I suspect that it would leave a number of Tango users
>>> (some developing professional software) in a bit of a lurch.
>> The threading package in Phobos is not very good, as it is based on my
>> very poor understanding of the problem. Drop kicking std.thread is
>> certainly open for discussion for v2. I wouldn't shed a tear for it <g>.
> 
> Maybe I'm missing something here; maybe it's because Phobos' threading
> is all I ever used, but what's wrong with it?
> I mean, it's threads .. you can start them, halt them, run stuff in them
> ... what more is needed? It's a very basic implementation, very close to
> the OS; but thanks to synchronized, I generally found it easy to add the
> primitives I needed.
> Somebody kindly explain. Thanks.

There are at least two known deadlock issues with the Phobos thread 
module.  One I've suggested a fix for (it's related to how object 
finalization occurs) and the other I've been unable to find the cause 
of.  The remaining issues are more subtle and probably not a concern for 
the average user.  Thread.getThis is an O(N) operation when it could be 
O(1), etc.


Sean



More information about the Digitalmars-d mailing list