package SRevent

import (
	"netease_control_center/utils/ihwsync"
	"sync"
)

var (
	lk        sync.Mutex
	allevents = make(map[SRevent_type]*eventCore)
)

type eventCore struct {
	Cond  *ihwsync.Cond
	Mutex sync.Mutex
}

func (this *eventCore) Init() {
	this.Cond = ihwsync.NewCond(&this.Mutex)
}

func init() {
	for i := SRevent_type(0); i < SRevent_type_max; i++ {
		tmp := new(eventCore)
		tmp.Init()
		allevents[i] = tmp
	}
}
