Closed mgrauer closed 2 years ago
No reason now, it’s vestigial from copypasta and debugging.
On Mon, Sep 9, 2019 at 2:49 PM Dan LaManna notifications@github.com wrote:
@danlamanna commented on this pull request.
In transfer/upload.go https://github.com/danlamanna/rivet/pull/4#discussion_r322398496:
- numWorkers := 10
- for w := 0; w < numWorkers; w++ {
- go func(id int) {
- for folderToBuild := range foldersToBuildChannel {
- if folderToBuild != nil {
- girder.GetOrCreateFolder(ctx, folderToBuild)
- folderResultsChannel <- true
- }
- }
- }(w)
why pass w?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/danlamanna/rivet/pull/4?email_source=notifications&email_token=AAERITZ2W6FHAE3HAMKTDJ3QI2LCJA5CNFSM4IUU2A42YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCEDZS3Y#pullrequestreview-285710703, or mute the thread https://github.com/notifications/unsubscribe-auth/AAERIT3F77ZTXQQ476H5MPTQI2LCJANCNFSM4IUU2A4Q .
A revised approach to concurrent folder creation that doesn't require changes to the Resource data structure.
If you like this approach @danlamanna, I can follow this up with breaking up the
Upload
function in a future PR to pave the way towardsrivet cp
.