[Issue 14953] std.concurrency: Add function to flush message box

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue Aug 25 13:57:17 PDT 2015


https://issues.dlang.org/show_bug.cgi?id=14953

--- Comment #2 from Sean Kelly <sean at invisibleduck.org> ---
That said, it seems like the underlying problem here may be dataflow-related. 
How do you know that all pending messages are really no longer relevant?  If
messages are really backing up (ie. something is producing more than you can
consume), maybe the dataflow is incorrect.  More consumers are needed, or maybe
some sort of throttling mechanism.

My concern is that I'm not sure that messages should ever be just discarded in
bulk.  I'd love to hear a good example where they should.  So while the API
seems straightforward, I'm not entirely convinced that it should exist. 
Thoughts?

--


More information about the Digitalmars-d-bugs mailing list