Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-merkledag
Commits
6598da30
Commit
6598da30
authored
Mar 29, 2018
by
Whyrusleeping
Committed by
GitHub
Mar 29, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4885 from ipfs/fix/visit-when-asked
only visit nodes in EnumerateChildrenAsync when asked
parents
5044152b
016ac37d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
merkledag.go
merkledag.go
+8
-8
No files found.
merkledag.go
View file @
6598da30
...
...
@@ -319,17 +319,17 @@ func EnumerateChildrenAsync(ctx context.Context, getLinks GetLinks, c *cid.Cid,
for
i
:=
0
;
i
<
FetchGraphConcurrency
;
i
++
{
go
func
()
{
for
ic
:=
range
feed
{
setlk
.
Lock
()
shouldVisit
:=
visit
(
ic
)
setlk
.
Unlock
()
if
shouldVisit
{
links
,
err
:=
getLinks
(
ctx
,
ic
)
if
err
!=
nil
{
errChan
<-
err
return
}
setlk
.
Lock
()
unseen
:=
visit
(
ic
)
setlk
.
Unlock
()
if
unseen
{
select
{
case
out
<-
links
:
case
<-
fetchersCtx
.
Done
()
:
...
...
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