Artem Chernyshev 41cf6c1c45 fix: get rid of data race in encoder and fix concurrent map access
Fixes: https://github.com/talos-systems/talos/issues/3377, https://github.com/talos-systems/talos/issues/3380

Fixed the data race in the encoder documentation examples by using `sync.Once`.
We only need to generate them once anyways and then it's not a big deal
that we are using the same pointers everywhere as they're pretty much
constant.

As of `system.go`, looks like we actually have concurrent operations for
partitions unmount so I just added a mutex there.

Signed-off-by: Artem Chernyshev <artem.0xD2@gmail.com>
2021-03-29 10:19:18 -07:00
..
2021-03-05 05:58:33 -08:00
2021-03-05 05:58:33 -08:00
2021-03-05 05:58:33 -08:00
2021-03-05 05:58:33 -08:00
2021-03-05 05:58:33 -08:00
2021-03-05 05:58:33 -08:00
2021-03-05 05:58:33 -08:00