-
Notifications
You must be signed in to change notification settings - Fork 0
/
examples.go
33 lines (29 loc) · 1012 Bytes
/
examples.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package syncs
import "github.com/devlights/try-golang/mapping"
type (
register struct{}
)
// NewRegister -- このパッケージ用のサンプルを登録する mapping.Register を生成します。
func NewRegister() mapping.Register {
return new(register)
}
// Regist -- 登録します.
func (r *register) Regist(m mapping.ExampleMapping) {
m["syncs_no_sync"] = NoSync
m["syncs_atomic_types"] = AtomicTypes
m["syncs_atomic_add"] = AtomicAdd
m["syncs_atomic_compare_and_swap"] = CompareAndSwap
m["syncs_use_channel"] = UseChannel
m["syncs_use_mutex"] = UseMutex
m["syncs_use_rwmutex"] = UseRWMutex
m["syncs_use_cond_signal"] = UseCondSignal
m["syncs_use_cond_broadcast"] = UseCondBroadcast
m["syncs_use_map"] = UseMap
m["syncs_use_once"] = UseOnce
m["syncs_use_oncefunc"] = UseOnceFunc
m["syncs_use_oncevalue"] = UseOnceValue
m["syncs_use_oncevalues"] = UseOnceValues
m["syncs_use_pool"] = UsePool
m["syncs_mutex_trylock"] = MutexTryLock
m["syncs_rwmutex_trylock"] = RWMutexTryLock
}