Closed bazzisl closed 1 year ago
func (w *AsyncWorld) Wait(fn func(g SyncWrapper) error) { w.lock.Lock() defer w.lock.Unlock() wait := make(chan struct{}) w.syncQueue = append(w.syncQueue, syncTask{ wait: wait, fn: fn, }) <-wait }
func (w *AsyncWorld) Wait(fn func(g SyncWrapper) error) { w.lock.Lock() wait := make(chan struct{}) w.syncQueue = append(w.syncQueue, syncTask{ wait: wait, fn: fn, }) w.lock.Unlock() <-wait }
PR is appreciated~