directory
0.0.0-20250116090452-c61a9e1a9ed2
Repository: https://github.com/omsobliga/go-example.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
sync/atomic标准库包中提供的Value类型可以用来读取和修改任何类型的值。 类型*Value有几个方法:Load、Store、Swap和CompareAndSwap(其中后两个方法实在Go 1.17中引入的)。 这些方法均以interface{}做为参数类型,所以传递给它们的实参可以是任何类型的值。 但是对于一个可寻址的Value类型的值v,一旦v.Store方法((&v).Store的简写形式)被曾经调用一次, 则传递给值v的后续方法调用的实参的具体类型必须和传递给它的第一次调用的实参的具体类型一致; 否则,将产生一个恐慌。nil接口类型实参也将导致v.Store()方法调用产生恐慌。 */.
示例:使用通道实现定时器.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
闭包.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
动态类型均为同一个不可比较类型的两个接口值的比较将产生一个恐慌.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
示例:使用 select 实现超时机制.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
crond 用法 一个c.Wait()调用将首先将当前协程推入到c所维护的等待协程队列; 一个c.Signal()调用将唤醒并移除c所维护的等待协程队列中的第一个协程(如果此队列不为空的话) 一个c.Broadcast()调用将唤醒并移除c所维护的等待协程队列中的所有协程(如果此队列不为空的话).
定时器:在未来某一时刻执行.
No description provided by the author
No description provided by the author