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

Added iterator functions without channels and goroutines. #8

Closed
wants to merge 3 commits into from
Closed

Added iterator functions without channels and goroutines. #8

wants to merge 3 commits into from

Conversation

zond
Copy link

@zond zond commented Jul 4, 2012

Since I want to wrap this tree in sync.RWMutex and use in a thread safe way, I would much prefer the submitted form of iterators. Would it be ok to accept that in your project, or should I stick with a fork?

regards,
//Martin

return false
}
}
if !t.eachInOrder(h.Right, lower, iterator) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

replace with "return t.eachInOrer(..."

@zond
Copy link
Author

zond commented Jul 4, 2012

Ah there, better? :)

@petar
Copy link
Owner

petar commented Jul 6, 2012

Yeah, I'll get back to pulling this in a day or two. Quite busy
at the moment.

Thanks
P

On 4 July 2012 16:20, zond
reply@reply.github.com
wrote:

Ah there, better? :)


Reply to this email directly or view it on GitHub:
#8 (comment)

@zond
Copy link
Author

zond commented Jul 6, 2012

Excellent, no hurry :)

@petar petar closed this Jul 9, 2012
@petar
Copy link
Owner

petar commented Jul 9, 2012

OK, so I rewrote your code a little. Some cosmetic renames, comments and simplified your conditional block structure.
Refactored some code in separate files. It was easier to submit it directly from my repo (so I am not merging this pull).

Take a look at it. See if you like it. Tell me how you want to be listed in the AUTHORS file.
Your name is not visible on github.

@zond
Copy link
Author

zond commented Jul 9, 2012

Ah, excellent!

No sweat, I just wanted those iterators - I find them cheaper than creating channels and goroutines.

If you want to you can add "Martin Bruse" as author, but it doesn't really matter to me, I really just wanted the iterators :)

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

Successfully merging this pull request may close these issues.

None yet

2 participants