News for hackers. Stuff that matters.
Re:Map.merge() – One method to rule them all by ben-schaaf on Sunday March 31, 2019 @11:27AM (#19536061)
If you mean lock-free as in no GIL, you obviously can't. But otherwise all python code is inherently thread safe.
Re:Map.merge() – One method to rule them all by meddlepal on Sunday March 31, 2019 @11:41AM (#19536125)
Yea I meant lock free and ready for multi-threaded use without a GIL. I didn't mean to dump on Python either, I write a lot of Python and Java but comparisons like yours aren't really fair because the JVM is just considerably more powerful than Python's runtime. I could take a huge list of words, hand subsets to threads and let them all update the same map using the same API and without needing a lock.