pkg/tools/http: remove valueMu mutex from http.Serve
The valueMu mutex was protecting cue.Value operations that are now
thread-safe after the race condition fixes in:
- internal/core/adt: WeakMap for regexp caching
- internal/core/adt: fix race in Vertex.Default()
- internal/core/runtime: lock protection for loaded map
Add TestConcurrentValueAccess to verify that the cue.Value operations
used by http.Serve handlers (LookupPath, String, Exists, Path, FillPath,
Default) are race-free when called concurrently on a shared value.
Updates #2733
Signed-off-by: Marcel van Lohuizen <mpvl@gmail.com>
Change-Id: I37d8224f11a53e1905983729303152b96ab939ca
Reviewed-on: https://cue.gerrithub.io/c/cue-lang/cue/+/1230714
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
Reviewed-by: Roger Peppe <rogpeppe@gmail.com>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>