[ASYNC-23] Support channel buffers of unlimited size Created: 10/Sep/13 Updated: 29/Jun/15 Resolved: 15/Sep/13
|Reporter:||Constantine Vetoshev||Assignee:||Timothy Baldridge|
|Patch:||Code and Test|
It is sometimes useful to use buffered async channels and not worry about either pre-allocating their size, or the way sliding and dropping buffers can lose potentially critical data passing through the channel.
The attached patch adds support for clojure.core.async/unlimited-buffer and cljs.core.async/unlimited-buffer for this purpose.
|Comment by Timothy Baldridge [ 15/Sep/13 3:55 PM ]|
One of the key aspects of core.async is that back-pressure and sliding/dropping buffers allow for decoupling of processes. A unbounded queue introduces many problems. Now a incorrectly designed system can crash, but not for some time. With the other buffer types a bug in the system will either a) allow producers to continue, or b) backup the producers allowing for easier debugging.
This patch doesn't really fit with CSP theory. And one of the main goals of core.async is to make users recognize where there are unbounded buffers, and allow them to remove them. Closing as this doesn't fit with the goals of the library.
|Comment by Daniel Compton [ 29/Jun/15 4:38 PM ]|
While I agree with Tim that this doesn't fit the goals of core.async, from a quick read through the patch, I don't think theres anything stopping you from creating this as a library (with proper warnings about the implications of using unbounded queues).