mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-05 03:27:48 +00:00
sync: only use a lock in the Map implementation when needed
This commit is contained in:
committed by
Ron Evans
parent
8d04821639
commit
79164dae71
+3
-1
@@ -1,10 +1,12 @@
|
||||
package sync
|
||||
|
||||
import "internal/task"
|
||||
|
||||
// This file implements just enough of sync.Map to get packages to compile. It
|
||||
// is no more efficient than a map with a lock.
|
||||
|
||||
type Map struct {
|
||||
lock Mutex
|
||||
lock task.PMutex
|
||||
m map[interface{}]interface{}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user