X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/f19e50e99dc4939199a9b9a4381a775d40453267..60e0be49f6fa0e24349635621acb4f7d273064d9:/sdk/go/streamer/transfer.go diff --git a/sdk/go/streamer/transfer.go b/sdk/go/streamer/transfer.go index 3f5f9344c5..bea27f8f81 100644 --- a/sdk/go/streamer/transfer.go +++ b/sdk/go/streamer/transfer.go @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: Apache-2.0 + /* Internal implementation of AsyncStream. Outline of operation: @@ -16,13 +20,13 @@ channel back to the transfer() function. Meanwhile, the transfer() function selects() on two channels, the "requests" channel and the "slices" channel. -When a message is recieved on the "slices" channel, this means the a new +When a message is received on the "slices" channel, this means the a new section of the buffer has data, or an error is signaled. Since the data has been read directly into the source_buffer, it is able to simply increases the size of the body slice to encompass the newly filled in section. Then any pending reads are serviced with handleReadRequest (described below). -When a message is recieved on the "requests" channel, it means a StreamReader +When a message is received on the "requests" channel, it means a StreamReader wants access to a slice of the buffer. This is passed to handleReadRequest(). The handleReadRequest() function takes a sliceRequest consisting of a buffer