code: func CreateInterruptCallback(handle *libmemif.MemifPacketHandle, interruptCh <-chan struct{}, callback func(handle *libmemif.MemifPacketHandle)) {
  	for {
  		select {
  		case <-interruptCh:
  			callback(handle)
  		case <-stopCh:
  			handle.Close()
  			return
  		}
  	}
  }
docs: // Creates user-friendly memif interrupt callback