code: func (r *record) Emit(ev Event, b []byte) {
  	// This looks absolutely _horrible_. It'd be better in C. Anyway, the idea
  	// is that we have a list of unsafe pointers, which is stored in the list
  	// which is an atomic pointer itself. We can swap the pointer held at each
  	// address in the list, so _that_ address needs to be loaded atomically.
  	// This means we need to actually load the data from the address at
  	// offset X from the start of the array underlying the slice.
  	//
  	// The cost of the atomic loading makes 5-10% slower, but allows us to
  	// atomically insert and remove listeners in many cases.
  
  	list := r.getUnsafeList()
  	for i := 0; i < len(list); i++ {
  		addr := uintptr(unsafe.Pointer(&list[i]))
  		value := atomic.LoadPointer(*(**unsafe.Pointer)(unsafe.Pointer(&addr)))
  		if value != nil {
  			(*(*Listener)(value)).Handle(ev, b)
  		}
  	}
  }
docs: // Emit invokes all attached listeners with the provided event.