Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

about Tick._openNodes #31

Open
jcmiao opened this issue Sep 15, 2017 · 2 comments
Open

about Tick._openNodes #31

jcmiao opened this issue Sep 15, 2017 · 2 comments

Comments

@jcmiao
Copy link

jcmiao commented Sep 15, 2017

When I define parallel nodes, tick._openNodes and lastOpenNodes have some problems
(my english is poor)

var start = 0;
var i;
for (i = 0; i < Math.min(lastOpenNodes.length, currOpenNodes.length); i++) {
  start = i + 1;
  if (lastOpenNodes[i] !== currOpenNodes[i]) {
    break;
  }
}

There are problems with this comparison


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@jcmiao
Copy link
Author

jcmiao commented Sep 15, 2017

i use a map to save current opennodes as bellow:
for i, v := range lastOpenNodes {
if !map.find(key(v)) {
v._close(tick)
}
}

@jcmiao
Copy link
Author

jcmiao commented Sep 15, 2017

It's going to make the node that I opened this time will be closed.
Perhaps because of the parallel node I joined, the tree has multiple running branches, which makes the last time and current opennodes compare

@jcmiao jcmiao closed this as completed Sep 15, 2017
@jcmiao jcmiao reopened this Sep 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant