Fix racy first instantiation (#930)

Signed-off-by: Clifton Kaznocha <ckaznocha@users.noreply.github.com>
This commit is contained in:
Clifton Kaznocha
2022-12-15 15:53:31 -08:00
committed by GitHub
parent c51a63058e
commit e44bdd040a

View File

@@ -625,8 +625,8 @@ const (
)
func (s *Store) getFunctionTypeID(t *FunctionType) (FunctionTypeID, error) {
key := t.key()
s.mux.RLock()
key := t.key()
id, ok := s.typeIDs[key]
s.mux.RUnlock()
if !ok {