![Notice](/static/shared/icon/info_gm_grey_24dp.svg)
The highest tagged major version is
v3.
package
Version:
v2.1.23
Opens a new window with list of versions in this module.
Published: Jul 11, 2023
License: Apache-2.0
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
func (m *Mutex) LockFunc(f func())
func (m *Mutex) TryLockFunc(f func()) (result bool)
func (m *RWMutex) LockFunc(f func())
LockFunc 写锁
func (m *RWMutex) RLockFunc(f func())
RLockFunc 读锁
TryLockFunc 写锁
PS: 不管加锁成功还是失败,不会阻塞.
TryRLockFunc 读锁
PS: 不管加锁成功还是失败,不会阻塞.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.