concurrent-map icon indicating copy to clipboard operation
concurrent-map copied to clipboard

add a clone() and append()?

Open Nyx2022 opened this issue 3 years ago • 1 comments

hello,as the title ,can you add a clone func to deep copy a cmap to a new one? and for the values like string,add a function maybe named append to append new string to the old ones stored before,because if the string stored in cmap is large,i get it and cancat with another large string will cost a lot of memory

Nyx2022 avatar Jan 21 '22 02:01 Nyx2022

@Nyx2022

For my personal opinion :

  1. Deep copy cmap cause another "Lock Competition" and it's purpose is opposite. Understanding cmap concept and you will know it.
  2. You can manually do string append or define a custom function. I don't think this action must be add to "library side". And it is not difficult or complex.

At last, thanks for you suggestion. Hope it can help

khndhkx123 avatar Aug 24 '22 03:08 khndhkx123