code: func (s *LocalSupervisor) WaitForEvent(ctx context.Context, name string, eventC chan Event) {
  	s.Lock()
  	defer s.Unlock()
  
  	waiter := &waiter{eventC: eventC, context: ctx}
  	event, ok := s.events[name]
  	if ok {
  		go s.notifyWaiter(waiter, event)
  		return
  	}
  	s.eventWaiters[name] = append(s.eventWaiters[name], waiter)
  }
docs: // WaitForEvent waits for event to be broadcasted, if the event
  // was already broadcasted, eventC will receive current event immediately.