diff options
author | aarzilli <alessandro.arzilli@gmail.com> | 2016-03-01 15:41:38 +0100 |
---|---|---|
committer | Přemysl Janouch <p@janouch.name> | 2018-09-08 16:49:24 +0200 |
commit | becaf43dcb3e9832c3eb951ff9908ed697868152 (patch) | |
tree | f2a45ac253c5ec8265efa78f1d4a2c993153fe18 /nexgb/xgb.go | |
parent | baff8c19067489ea26bbb804ef693e966202b511 (diff) | |
download | haven-becaf43dcb3e9832c3eb951ff9908ed697868152.tar.gz haven-becaf43dcb3e9832c3eb951ff9908ed697868152.tar.xz haven-becaf43dcb3e9832c3eb951ff9908ed697868152.zip |
Read/Write mutex for Extensions map
Diffstat (limited to 'nexgb/xgb.go')
-rw-r--r-- | nexgb/xgb.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/nexgb/xgb.go b/nexgb/xgb.go index 44634fe..f49d19b 100644 --- a/nexgb/xgb.go +++ b/nexgb/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. |