Skip to content
This repository was archived by the owner on Jan 11, 2019. It is now read-only.

doesnt work in parallel usage (multiple goroutines) #26

Closed
rhaps107 opened this issue Apr 19, 2017 · 3 comments
Closed

doesnt work in parallel usage (multiple goroutines) #26

rhaps107 opened this issue Apr 19, 2017 · 3 comments

Comments

@rhaps107
Copy link

In parsing, global package variable layoutRegexp is changing. It is map, so usage in multiple gorountines causes map concurrent write error.

@gorhill
Copy link
Owner

gorhill commented Apr 19, 2017

Is there a written rule out there that all packages must be concurrency-safe?

@s7v7nislands
Copy link

so when using this package, I can't using goroutine?

@hus787
Copy link

hus787 commented Jun 6, 2017

@gorhill I suppose so else Golang doesn't guarantee anything.

Ref: golang/go#13446 (comment)

kyoh86 pushed a commit to wacul/batch that referenced this issue Aug 2, 2017
dadgar added a commit to dadgar/cronexpr that referenced this issue Sep 15, 2017
This PR allows concurrent calls to Parse. Further it makes the test be
part of the same package.

Fixes gorhill#26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants