<< Back to previous view

[ASYNC-23] Support channel buffers of unlimited size Created: 10/Sep/13  Updated: 29/Jun/15  Resolved: 15/Sep/13

Status: Closed
Project: core.async
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Enhancement Priority: Major
Reporter: Constantine Vetoshev Assignee: Timothy Baldridge
Resolution: Declined Votes: 0
Labels: None


Attachments: Text File 0001-Add-unlimited-size-buffer-implementation.patch    
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).

Generated at Mon Nov 30 03:48:54 CST 2015 using JIRA 4.4#649-r158309.