github.com/wangyougui/gf/v2@v2.6.5/os/gmutex/gmutex.go (about) 1 // Copyright GoFrame Author(https://goframe.org). All Rights Reserved. 2 // 3 // This Source Code Form is subject to the terms of the MIT License. 4 // If a copy of the MIT was not distributed with this file, 5 // You can obtain one at https://github.com/wangyougui/gf. 6 7 // Package gmutex inherits and extends sync.Mutex and sync.RWMutex with more futures. 8 // 9 // Note that, it is refracted using stdlib mutex of package sync from GoFrame version v2.5.2. 10 package gmutex 11 12 // New creates and returns a new mutex. 13 // Deprecated: use Mutex or RWMutex instead. 14 func New() *RWMutex { 15 return &RWMutex{} 16 }