code: func (handle *MemifPacketHandle) Close() {
  	handle.closeMu.Lock()
  	defer handle.closeMu.Unlock()
  
  	// wait for packet reader to stop
  	handle.readMu.Lock()
  	defer handle.readMu.Unlock()
  
  	// wait for packet writer to stop
  	handle.writeMu.Lock()
  	defer handle.writeMu.Unlock()
  
  	// stop reading and writing
  	handle.stop = true
  }
docs: // Waits for all read and write operations to finish and then prevents more from occurring. Handle can be closed only
  // once and then can never be opened again.