Thread overview
std.concurrency.setMaxMailboxSize
Oct 11, 2017
RazvanN
Oct 11, 2017
rikki cattermole
Oct 11, 2017
RazvanN
Oct 11, 2017
rikki cattermole
October 11, 2017
Hi all,

I have seen that the concurrency api has this method specified in $title [1] and I was wondering what is the use of it? Enabling threads to modify the message box of other threads doesn't seem to be a good idea and I can't think of any real use case.

Best regards,
RazvanN

[1] https://dlang.org/phobos/std_concurrency.html#.setMaxMailboxSize
October 11, 2017
On 11/10/2017 12:09 PM, RazvanN wrote:
> Hi all,
> 
> I have seen that the concurrency api has this method specified in $title [1] and I was wondering what is the use of it? Enabling threads to modify the message box of other threads doesn't seem to be a good idea and I can't think of any real use case.
> 
> Best regards,
> RazvanN
> 
> [1] https://dlang.org/phobos/std_concurrency.html#.setMaxMailboxSize

Main controlling thread setting child threads?

Otherwise I don't remember the last time it was mentioned, so I'd say leave it be :)
October 11, 2017
On Wednesday, 11 October 2017 at 11:26:11 UTC, rikki cattermole wrote:
> On 11/10/2017 12:09 PM, RazvanN wrote:
>> Hi all,
>> 
>> I have seen that the concurrency api has this method specified in $title [1] and I was wondering what is the use of it? Enabling threads to modify the message box of other threads doesn't seem to be a good idea and I can't think of any real use case.
>> 
>> Best regards,
>> RazvanN
>> 
>> [1] https://dlang.org/phobos/std_concurrency.html#.setMaxMailboxSize
>
> Main controlling thread setting child threads?
>
> Otherwise I don't remember the last time it was mentioned, so I'd say leave it be :)

Shouldn't the thread be in charge of its mailbox size? Otherwise, main can pass the max size in the constructor.
October 11, 2017
On 11/10/2017 12:43 PM, RazvanN wrote:
> On Wednesday, 11 October 2017 at 11:26:11 UTC, rikki cattermole wrote:
>> On 11/10/2017 12:09 PM, RazvanN wrote:
>>> Hi all,
>>>
>>> I have seen that the concurrency api has this method specified in $title [1] and I was wondering what is the use of it? Enabling threads to modify the message box of other threads doesn't seem to be a good idea and I can't think of any real use case.
>>>
>>> Best regards,
>>> RazvanN
>>>
>>> [1] https://dlang.org/phobos/std_concurrency.html#.setMaxMailboxSize
>>
>> Main controlling thread setting child threads?
>>
>> Otherwise I don't remember the last time it was mentioned, so I'd say leave it be :)
> 
> Shouldn't the thread be in charge of its mailbox size? Otherwise, main can pass the max size in the constructor.

Callee, versus caller. Just depends how you're thinking of the responsibility. You can make arguments either way.