Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
neoppod
Commits
f3e73456
Commit
f3e73456
authored
Apr 19, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xbufio: .
parent
95967669
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
3 deletions
+16
-3
t/neo/storage/fs1/xbufio.go
t/neo/storage/fs1/xbufio.go
+16
-3
No files found.
t/neo/storage/fs1/xbufio.go
View file @
f3e73456
// TODO copyright / license
// Copyright (C) 2017 Nexedi SA and Contributors.
// Kirill Smelkov <kirr@nexedi.com>
//
// This program is free software: you can Use, Study, Modify and Redistribute
// it under the terms of the GNU General Public License version 2, or (at your
// option) any later version, as published by the Free Software Foundation.
//
// This program is distributed WITHOUT ANY WARRANTY; without even the implied
// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
//
// See COPYING file for full licensing terms.
// XXX move -> xbufio
// XXX move -> xbufio
...
@@ -13,8 +23,11 @@ import (
...
@@ -13,8 +23,11 @@ import (
// SeqBufReader implements buffering for a io.ReaderAt optimized for sequential access
// SeqBufReader implements buffering for a io.ReaderAt optimized for sequential access
// Both forward, backward and interleaved forward/backward access patterns are supported
// Both forward, backward and interleaved forward/backward access patterns are supported
//
//
// XXX access from multiple goroutines? (it is required per io.ReaderAt
// NOTE SeqBufReader is not safe to use from multiple goroutines concurrently.
// interface, but for sequential workloads we do not need it)
// Strictly speaking this goes against io.ReaderAt interface but sequential
// workloads usually means sequential processing. It would be a pity to
// add mutex for nothing.
//
// XXX -> xbufio.SeqReader
// XXX -> xbufio.SeqReader
type
SeqBufReader
struct
{
type
SeqBufReader
struct
{
// buffer for data at pos. cap(buf) - whole buffer capacity
// buffer for data at pos. cap(buf) - whole buffer capacity
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment