gorhill / cronexpr

Cron expression parser in Go language (golang)
683 stars 168 forks source link

Allow library to be used in parallel #30

Closed dadgar closed 6 years ago

dadgar commented 7 years ago

This PR allows concurrent calls to Parse. Further it makes the test be part of the same package.

Fixes https://github.com/gorhill/cronexpr/issues/26

dadgar commented 6 years ago

@gorhill Is there any reason you aren't merging this?

gorhill commented 6 years ago

I haven't touched the code here for years, and anything than trivial changes would require me to devote a lot of time to code review since I would need to all get back how the code works to ensure no regression.

dadgar commented 6 years ago

Well if it is of any use to you in your decision, HashiCorp Nomad has been shipping with a fork with this change for many months on tens of thousands of machines with no issue.

gorhill commented 6 years ago

been shipping with a fork with this change for many months on tens of thousands of machines with no issue

Yes, it does make a difference knowing this -- I will go ahead and merge. Thanks.