[dmd-concurrency] draft 5
Robert Jacques
sandford at jhu.edu
Thu Jan 21 05:43:18 PST 2010
On Thu, 21 Jan 2010 00:24:40 -0500, Andrei Alexandrescu
<andrei at erdani.com> wrote:
> Robert Jacques wrote:
>> On Wed, 20 Jan 2010 21:27:29 -0500, Andrei Alexandrescu
>> <andrei at erdani.com> wrote:
>>
>>> 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
>> I was actually think capacity would be a property and therefore
>> support atomicity.
>
> I mean: you want to set capacity _and_ contingency action in one atomic
> unit.
>
> Andrei
You're right. I forgot about the contingency action. Still, member
functions generally are nicer than free functions.
More information about the dmd-concurrency
mailing list