Documentation ¶
Index ¶
Constants ¶
View Source
const POINT = 10
POINT 自旋当前次数协程让出CPU
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConcurrentIntArray ¶
type ConcurrentIntArray interface { // Set 用于设置指定索引上的元素值。 Set(index int, elem int) (old int, err error) // Get 用于获取指定索引上的元素值。 Get(index int) (elem int, err error) // Len 用于获取数组的长度。 Len() int }
ConcurrentIntArray int类型并发安全切片
func NewConcurrentIntArray ¶
func NewConcurrentIntArray(length int) ConcurrentIntArray
NewConcurrentIntArray 工厂方法
type ConcurrentStrArray ¶
type ConcurrentStrArray interface { // Set 用于设置指定索引上的元素值。 Set(index int, elem string) (old string, err error) // Get 用于获取指定索引上的元素值。 Get(index int) (elem string, err error) // Len 用于获取数组的长度。 Len() int }
ConcurrentStrArray string类型并发安全切片
func NewConcurrentStrArray ¶
func NewConcurrentStrArray(length int) ConcurrentStrArray
NewConcurrentStrArray 工厂方法
Click to show internal directories.
Click to hide internal directories.