fix race in MockResourceProvider
Input can be called concurrently from multiple nodes in the graph.
This commit is contained in:
parent
08339b004b
commit
db6ef69e5b
|
@ -94,6 +94,8 @@ func (p *MockResourceProvider) Close() error {
|
||||||
|
|
||||||
func (p *MockResourceProvider) Input(
|
func (p *MockResourceProvider) Input(
|
||||||
input UIInput, c *ResourceConfig) (*ResourceConfig, error) {
|
input UIInput, c *ResourceConfig) (*ResourceConfig, error) {
|
||||||
|
p.Lock()
|
||||||
|
defer p.Unlock()
|
||||||
p.InputCalled = true
|
p.InputCalled = true
|
||||||
p.InputInput = input
|
p.InputInput = input
|
||||||
p.InputConfig = c
|
p.InputConfig = c
|
||||||
|
|
Loading…
Reference in New Issue