[dmd-concurrency] draft 5
    Andrei Alexandrescu 
    andrei at erdani.com
       
    Tue Jan 19 09:53:49 PST 2010
    
    
  
I think it should compile, so you may want to add it to bugzilla.
Andrei
Robert Jacques wrote:
> On Tue, 19 Jan 2010 08:02:25 -0500, Michel Fortin 
> <michel.fortin at michelf.com> wrote:
>> Last is an idea to improve the API, but probably won't have any 
>> consequence on the book unless you want to talk about it. In addition 
>> to the function taking standard enumerated values I think having this 
>> would be great:
>>
>>     alias void delegate(Variant message) shared OnCrowdingHandler;
>>     void setMaxMailboxSize(Tid tid, size_t messages, OnCrowdingHandler 
>> doThis);
>>
>> With this I could setup things so that if one thread is crowded the 
>> message would be sent to another thread instead. I could also want to 
>> write a log of those unpassed messages or something. Or I could make a 
>> zero-sized mailbox and use the crowding callback to send the message 
>> using an alternate dispatching mechanism (like sending a GUI event, 
>> making the GUI tread able to receive messages).
>>
> 
> Currently, alias void delegate(Variant message) shared 
> OnCrowdingHandler; doesn't compile, though I definitely see the 
> usefulness of shared delegates. Should this be filed in bugzilla?
> _______________________________________________
> dmd-concurrency mailing list
> dmd-concurrency at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/dmd-concurrency
    
    
More information about the dmd-concurrency
mailing list