On Tue, Dec 31, 2013 at 6:46 PM, Patrick Walton <pcwal...@mozilla.com>wrote:

> On 12/30/13 8:46 PM, Christian Ohler wrote:
>
>> To address the last sentence – bounded channels with default size 0
>> _do_ minimize the fallout of this design: The program would reliably
>> deadlock every time it is tested with a nonzero number of images,
>> since A will try to write to "Images" while B is blocked receiving
>> from "Done", not listening on "Images" yet.  I don't see this deadlock
>> as a nasty hazard – the code wouldn't work at all, and the programmer
>> would immediately notice.  If the programmer uses a non-zero buffer
>> size for the channel, it's a magic number that they came up with, so
>> they should know to test inputs around that magnitude.
>>
>
> I suspect a lot of programmers in systems with bounded channels just come
> up with some round number (like 10) and forget about it. Similar to the
> argument to listen(2)...
>
> Patrick
>
>
Anecdotal evidence: I work with distributed systems, and most of our
"limits" are in fact completely winged and rarely if ever touched... except
after an issue where we realize we could do better.

This is the kind of things where you don't have enough experience with the
system as you first write it, so you put some "reasonable" limits, and then
just forget that you needed to come back it and check if it really
worked... but then, on the other hand, if it passes the testing isn't it
that it works well enough ?


> _______________________________________________
> Rust-dev mailing list
> Rust-dev@mozilla.org
> https://mail.mozilla.org/listinfo/rust-dev
>
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to