[ASYNC-23] Support channel buffers of unlimited size Created: 10/Sep/13 Updated: 15/Sep/13 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.