anko
anko copied to clipboard
Data race when running scripts concurrently
When I run multiple scripts concurrently, I get a data race when the global variables Packages and PackageTypes are accessed here and here.
I add and remove packages from env.Packages
and env.PackageTypes
before a script is executed. That's why I get a data race because the access to those global variables is not synchronised. I was able to fix this issue by allowing packages to be defined on an environment level – see pull request below.
Might be related to #34
Thanks. Could you please add tests?
Done
@mattn Any chance to get this merged?