It says that scala TrieMap will produce a consistent
iterator when iterating over the TrieMap, I don't understand what consistent
here really means.
I need an collection to build an object pools, that is, objects in the pool will be borrowed/released concurrently, and in the meanwhile, a scheduled thread will iterate over this collection,and check whether there are stale objects, if there is, then create a new one and delete the stale one from the collection.
I am evaluating whether scala TrieMap can be used as the pool.
Also, can someone show some code to illustrate the difference between scala TrieMap
and Java ConcurrentHashMap
?