[ARVADOS] updated: 941bcf698f1cfb498510a13f23d3c9d403b0435f
git at public.curoverse.com
git at public.curoverse.com
Mon May 19 15:15:03 EDT 2014
Summary of changes:
sdk/go/src/arvados.org/buffer/buffer.go | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
via 941bcf698f1cfb498510a13f23d3c9d403b0435f (commit)
from 9482cf9f326ce64f9ea100aa34680278bdd6018e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 941bcf698f1cfb498510a13f23d3c9d403b0435f
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Mon May 19 15:15:01 2014 -0400
2798: Finished writing documentation comment for buffer package.
diff --git a/sdk/go/src/arvados.org/buffer/buffer.go b/sdk/go/src/arvados.org/buffer/buffer.go
index 81a9ca3..e2ee1c4 100644
--- a/sdk/go/src/arvados.org/buffer/buffer.go
+++ b/sdk/go/src/arvados.org/buffer/buffer.go
@@ -1,9 +1,23 @@
-/* Implements a buffer that is filled incrementally from a io.Reader and
-supports multiple readers on the buffer.
+/* Implements a buffer that supports concurrent incremental read and append.
+New readers start reading from the beginning of the buffer, block when reaching
+the end of the buffer, and are unblocked as new data is added.
Usage:
-To
+Begin reading into a buffer with maximum size 'buffersize' from 'source':
+ tr := StartTransferFromReader(buffersize, source)
+
+To create a new reader (this can be called multiple times):
+ r := tr.MakeBufferReader()
+
+When you're done with the buffer:
+ tr.Close()
+
+
+Alternately, if you already have a filled buffer and just want to read out from it:
+ tr := StartTransferFromSlice(buf)
+ r := tr.MakeBufferReader()
+ tr.Close()
*/
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list