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

using sync.Pool #98

Closed
manucorporat opened this issue Jul 5, 2015 · 5 comments
Closed

using sync.Pool #98

manucorporat opened this issue Jul 5, 2015 · 5 comments

Comments

@manucorporat
Copy link

This is just a suggestion: so instead of implementing your own pool:
https://github.com/bluesuncorp/validator/blob/v5/validator.go#L47-L52

it could be a good idea to use the built-in pool implementation of the sync package.

@deankarn
Copy link
Contributor

deankarn commented Jul 5, 2015

I will look into it, thanks!

@deankarn
Copy link
Contributor

deankarn commented Jul 5, 2015

it helps with parallel benchmarks a bit and slightly increases the non parallel ones, but it's negligible.

since this library is fully thread safe and I suspect will be used within a webserver or some other logic that will be parallelized this change will help with that.

so going forward with the change.

@manucorporat
Copy link
Author

Awesome, here another advantage:

  • less code -> less possible bugs

😄

@deankarn
Copy link
Contributor

deankarn commented Jul 5, 2015

True,

ok v5.10 is now out, I had to drop support for go 1.2 for this change, but I think that's more than justified.

@deankarn deankarn closed this as completed Jul 5, 2015
@manucorporat
Copy link
Author

@joeybloggs yes! I think it is ok to drop support for Go 1.2.
Go 1.4.2 is the most stable version to date and it is the default one in Google App Engine, so...

fairyhunter13 added a commit to fairyhunter13/validator that referenced this issue Jul 12, 2020
fairyhunter13 added a commit to fairyhunter13/validator that referenced this issue Jul 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants