[dmd-concurrency] draft 5

Andrei Alexandrescu andrei at erdani.com
Wed Jan 20 18:27:29 PST 2010


Robert Jacques wrote:
> On Wed, 20 Jan 2010 01:36:10 -0500, Andrei Alexandrescu 
> <andrei at erdani.com> wrote:
> 
>> Kevin Bealer wrote:
>>> So the caller calls setMaxMailboxSize with a callee's Tid.  Then that 
>>> caller will not send messages unless the callee's mailbox is smaller 
>>> than that amount?
>>>  Will all callers obey the limit, or should they each set their own 
>>> limit?  If the latter, then the design is as I thought.
>>
>> Each thread has a mailbox. That mailbox has a capacity. That capacity 
>> can be set from any thread. It's that simple.
>>
>> Andrei
> 
> Bike shed but, what about: tid.capacity = N; ?

Yah but sometimes one needs to also set the contingency action atomically.

Andrei


More information about the dmd-concurrency mailing list