goplus / igop

The Go/Go+ Interpreter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fatal error: concurrent map read and map write

456vv opened this issue · comments

commented

在多线程调用 .RunFunc 发生错误。

fatal error: concurrent map read and map write

goroutine 308 [running]:
github.com/goplus/reflectx.(*provider).Insert(0x2763ab0, 0xc006918700)
        github.com/goplus/reflectx@v1.1.1/icall_regabi.go:41 +0x6f
github.com/goplus/reflectx.(*Context).registerMethod(0xc006f44330, 0x1668640?)
        github.com/goplus/reflectx@v1.1.1/methodof.go:115 +0xb7
github.com/goplus/reflectx.(*Context).setMethodSet(0xc006f44330, {0x1d9be18, 0xc006918620}, {0xc0084cb180, 0x2, 0x2})
        github.com/goplus/reflectx@v1.1.1/methodof.go:272 +0x83b
github.com/goplus/reflectx.(*Context).SetMethodSet(0xc008fb0400?, {0x1d9be18, 0xc006918620}, {0xc0084cb180, 0x2, 0x2}, 0x0)
        github.com/goplus/reflectx@v1.1.1/method.go:269 +0x3c5
github.com/goplus/igop.(*TypesRecord).setMethods(0xc005991b00, {0x1d9be18?, 0xc006918620}, {0xc007755050, 0x2, 0x1668600?})
        github.com/goplus/igop@v0.16.1/xtypes.go:465 +0x459
github.com/goplus/igop.(*TypesRecord).toNamedType(0xc005991b00, 0x1d868c0?)
        github.com/goplus/igop@v0.16.1/xtypes.go:347 +0x272
github.com/goplus/igop.(*TypesRecord).ToType(0xc005991b00?, {0x1d868c0?, 0xc00b01cbd0?})
        github.com/goplus/igop@v0.16.1/xtypes.go:264 +0x38b
github.com/goplus/igop.(*TypesRecord).ToType(0x16835e0?, {0x1d868e8?, 0xc004988130?})
        github.com/goplus/igop@v0.16.1/xtypes.go:242 +0xd8
github.com/goplus/igop.(*Interp).preToType(0xc0027755f0, {0x1d868e8, 0xc004988130})
        github.com/goplus/igop@v0.16.1/interp.go:1242 +0x5f
github.com/goplus/igop.(*visitor).program(0xc006f44660)
        github.com/goplus/igop@v0.16.1/visit.go:84 +0x209
github.com/goplus/igop.checkPackages(0xc0027755f0, {0xc0076db4d0, 0x2, 0x4?})
        github.com/goplus/igop@v0.16.1/visit.go:54 +0x1a6
github.com/goplus/igop.newInterp(0xc0004c6c40, 0xc0040e8c00, 0x0)
        github.com/goplus/igop@v0.16.1/interp.go:1214 +0x88e
github.com/goplus/igop.NewInterp(...)
        github.com/goplus/igop@v0.16.1/interp.go:1137
github.com/goplus/igop.(*Context).NewInterp(0x4?, 0xc007f48750?)
        github.com/goplus/igop@v0.16.1/context.go:587 +0x1b
github.com/goplus/igop.(*Context).RunFunc(0x0?, 0x179c600?, {0x17ccc0b, 0x4}, {0xc003a53418, 0x1, 0x1})
        github.com/goplus/igop@v0.16.1/context.go:579 +0x32