The highest tagged major version is
v3.
package
Version:
v2.8.101
Opens a new window with list of versions in this module.
Published: Oct 12, 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.