A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2016-June/145361.html below:

[Python-Dev] PEP 487: Simpler customization of class creation

[Python-Dev] PEP 487: Simpler customization of class creation [Python-Dev] PEP 487: Simpler customization of class creationRaymond Hettinger raymond.hettinger at gmail.com
Mon Jun 20 22:17:00 EDT 2016
> On Jun 20, 2016, at 5:41 PM, Tim Delaney <timothy.c.delaney at 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

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4