Skip to content

Commit

Permalink
list comment
Browse files Browse the repository at this point in the history
  • Loading branch information
lingrino committed Jun 3, 2018
1 parent 88f1669 commit 0bab02d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,14 @@ See the checklist below for progress and upcoming features.
- [ ] Policy Enforce
- [ ] Approle Enforce
- [ ] Userpass Enforce
- [ ] Add Timeouts to Workers
- [ ] Support Wrapped Secrets

**CLI Improvements:**
- [ ] Add tests
- [ ] Add to homebrew
- [ ] Add example usage
- [ ] Support concurrency flag
- [ ] Support more than JSON output
- [ ] Add write/update commands (native CLI probably better for writing data)

Expand Down
9 changes: 7 additions & 2 deletions vaku/folder_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,13 @@ func (c *Client) FolderList(i *PathInput) ([]string, error) {
i.TrimPathPrefix = false

// Concurrency tools for waiting on workers
inputsC := make(chan *PathInput, 5)
resultsC := make(chan *folderListWorkerOutput, 5)
// NOTE - The '500' chosen here is rather arbitrary, the value used to be only '5'
// but it could cause deadlock if there were more than 5 folders to be listed in a row
// technically this means for a VERY large list with 500 folders in a row this will
// also deadlock. This can be mitigated with timeouts and solved by looping better across
// the inputs channel and breaking up the work more so as not to fill the channel
inputsC := make(chan *PathInput, 500)
resultsC := make(chan *folderListWorkerOutput, 500)
var inputsWG sync.WaitGroup
var resultsWG sync.WaitGroup

Expand Down

0 comments on commit 0bab02d

Please sign in to comment.