Versions in this module Expand all Collapse all v0 v0.2.1 Jul 6, 2015 Changes in this version + const APPEND + func LockDo(lock sync.Locker, fn func()) + type MRWMutex struct + func NewMRWMutex() *MRWMutex + func (m *MRWMutex) Lock(lockId string) + func (m *MRWMutex) NewId(id string) string + func (m *MRWMutex) RLock(lockId string) + func (m *MRWMutex) RLocker(lockId string) sync.Locker + func (m *MRWMutex) RUnlock(lockId string) + func (m *MRWMutex) Unlock(lockId string) + type Once struct + func (o *Once) Do(f func()) + func (o *Once) ErrorDo(f func() error) error + func (o *Once) Undo() + type Queue struct + func (q *Queue) Dequeue() Task + func (q *Queue) Enqueue(t Task) bool + type Scheduler struct + func New() *Scheduler + func (s *Scheduler) AddQueue(id uint32, capacity int) + func (s *Scheduler) AddTask(id uint32, t Task) (success bool) + func (s *Scheduler) GetTask() Task + func (s *Scheduler) Run() + type Signal struct + func NewSignal() *Signal + func (s *Signal) Notify() + func (s *Signal) Wait() + type Spinlock int32 + func (s *Spinlock) Lock() + func (s *Spinlock) Unlock() + type Task interface + Execute func() + type TaskFunc func() + func (f TaskFunc) Execute()