We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 79e6484 commit ca39297Copy full SHA for ca39297
arduino/cores/board.go
@@ -18,6 +18,7 @@ package cores
18
import (
19
"fmt"
20
"strings"
21
+ "sync"
22
23
"github.com/arduino/go-properties-orderedmap"
24
)
@@ -27,6 +28,7 @@ type Board struct {
27
28
BoardID string
29
Properties *properties.Map `json:"-"`
30
PlatformRelease *PlatformRelease `json:"-"`
31
+ configOptionsMux sync.Mutex
32
configOptions *properties.Map
33
configOptionValues map[string]*properties.Map
34
configOptionProperties map[string]*properties.Map
@@ -69,6 +71,8 @@ func (b *Board) String() string {
69
71
}
70
72
73
func (b *Board) buildConfigOptionsStructures() {
74
+ b.configOptionsMux.Lock()
75
+ defer b.configOptionsMux.Unlock()
76
if b.configOptions != nil {
77
return
78
0 commit comments