> On Jun 20, 2016, at 5:41 PM, Tim Delaney <timothy.c.dela...@gmail.com> wrote: > > Although not a Jython developer, I've looked into the code a few times. > > The major stumbling block as I understand it will be that Jython uses a > ConcurrentHashMap as the underlying structure for a dictionary. This would > need to change to a concurrent LinkedHashMap, but there's no such thing in > the standard library. The best option would appear to be > https://github.com/ben-manes/concurrentlinkedhashmap. > > There are also plenty of other places that use maps and all of them would > need to be looked at. In a lot of cases they're things like IdentityHashMap > which may also need an ordered equivalent.
If you can, check with Jim Baker. At the language summit a few years ago, he and I sketched out a solution that he thought was doable without much effort and without much of a performance hit. IIRC, it involved using a ConcurrentHashMap augmented by an auxiliary 2-by-n-row array of indices (one for forward links and the other for backward links). There was also need to add a reentrant lock around the mutating methods. Raymond Hettinger _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com