www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - std.concurrency.setMaxMailboxSize

reply RazvanN <razvan.nitu1305 gmail.com> writes:
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
Oct 11
parent reply rikki cattermole <rikki cattermole.co.nz> writes:
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 :)
Oct 11
parent reply RazvanN <razvan.nitu1305 gmail.com> writes:
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.
Oct 11
parent rikki cattermole <rikki cattermole.co.nz> writes:
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.
Oct 11