Files
mostlymatter/plugin
Agniva De Sarker edddabf95c MM-19628: Fix race in (*registeredPlugin).State access (#13332)
* MM-19628: Fix race in (*registeredPlugin).State access

We used a pointer to an integer in the State variable, and therefore
setting a pointer value directly caused a race condition.

Since the registeredPlugin is a private struct, changing it to a normal int
creates fewer pointers and lets us to fix the race condition by simply setting
the integer value and then doing a registeredPlugins.Store.

The alternative to keeping the pointer would be to create a copy of each
member of a registeredPlugin and do a store again, which I feel is a roundabout
way to achieve this.

* Address review comments

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-01-07 17:30:34 +05:30
..
2020-01-06 17:08:24 -04:00
2020-01-06 17:08:24 -04:00
2020-01-06 17:08:24 -04:00
2020-01-06 17:08:24 -04:00