TDPL goes out for preliminary review

Jason House jason.james.house at gmail.com
Wed Dec 23 17:58:54 PST 2009


Andrei Alexandrescu wrote:

> Jason House wrote:
>> Andrei Alexandrescu Wrote:
>> 
>>> But let's not forget we have concurrency ahead of us. I encourage you
>>> all to chime in with your thoughts and ideas regarding all aspects of
>>> concurrency. The recent multicore performance bug is a great starting
>>> point. If you try e.g. shared and it's broken, let us know. If you try
>>> it and it works, push it til it breaks. If you have ideas on how to make
>>> semantic checking better, pipe up.
>> 
>> I posted several shared issues to the NG a few days ago and got no
>> replies. Most of it was about poor error messages (both misleading text
>> and missing file/line numbers). I should do proper bugzilla entries but
>> haven't tinkered with D much since. As always, this post comes from my
>> phone instead of a proper computer, or else I'd provide a link or do the
>> bugzilla entries while I'm thinking of it.
>> 
>> IIRC, the most troublesome error happened when I created "shared
>> this(){...}" constructor and no information on where it caused errors.
> 
> Thanks, Jason. I did see those messages but I didn't want to dilute
> focus back when you posted them.
> 
> If you could put together bugzilla entries as you try things, that would
> be great. The shared constructor I'll experiment with first.

I have reproduced and reported most of the issue I had hit with shared. If 
it's any consolation, I was able to convert my message passing queues to use 
shared, but hit issues when expanding to cover other uses of shared data 
within my code base.  There may also be an issue with what a shared delegate 
is supposed to be and what can be inside of one, but I haven't really 
worried about that too much.  It's a hairy issue and partly my fault for 
using delegates as messages between threads.  When sending a message, I cast 
the delegate to a shared delegate even though it access immutable data and 
has no side effect except on thread-local data in the receiving thread.

bugzilla 3640
     shared this() constructor does not work and reports strange errors
     without line numbers

bugzilla 3641 keywords: rejects-valid
    alias shared T U does not work

bugzilla 3642 keywords: diagnostic
    Poor error message when using shared: 
    function ___ not callable with argument types ___




More information about the Digitalmars-d mailing list