summaryrefslogtreecommitdiff
path: root/xgb.go
diff options
context:
space:
mode:
authoraarzilli <[email protected]>2016-03-01 15:41:38 +0100
committeraarzilli <[email protected]>2016-03-21 18:51:44 +0100
commit7bf5680164d697fb85b823032e43340db3ec61dc (patch)
treebea4be9d3cb855dd24797392c35c6ad0f5f69d85 /xgb.go
parentd3d84afd14161dc1c07449d8f9feb2dca6ccc10b (diff)
Read/Write mutex for Extensions map
Diffstat (limited to 'xgb.go')
-rw-r--r--xgb.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/xgb.go b/xgb.go
index 44634fe..f49d19b 100644
--- a/xgb.go
+++ b/xgb.go
@@ -13,11 +13,6 @@ var (
// Where to log error-messages. Defaults to stderr.
// To disable logging, just set this to log.New(ioutil.Discard, "", 0)
Logger = log.New(os.Stderr, "XGB: ", log.Lshortfile)
-
- // ExtLock is a lock used whenever new extensions are initialized.
- // It should not be used. It is exported for use in the extension
- // sub-packages.
- ExtLock sync.Mutex
)
const (
@@ -66,6 +61,11 @@ type Conn struct {
seqChan chan uint16
reqChan chan *request
closing chan chan struct{}
+
+ // ExtLock is a lock used whenever new extensions are initialized.
+ // It should not be used. It is exported for use in the extension
+ // sub-packages.
+ ExtLock sync.RWMutex
// Extensions is a map from extension name to major opcode. It should
// not be used. It is exported for use in the extension sub-packages.