Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SyncVar ¶
type SyncVar[T any] struct { // contains filtered or unexported fields }
SyncVar 线程安全的变量封装
func (*SyncVar[T]) ForRead ¶
func (syncVar *SyncVar[T]) ForRead(readVarFunc ReadVarFunc[T])
ForRead 为写而获取变量
func (*SyncVar[T]) ForWrite ¶
func (syncVar *SyncVar[T]) ForWrite(writeVarFunc WriteVarFunc[T])
ForWrite 为写而获取变量
Click to show internal directories.
Click to hide internal directories.