Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Indeed. I recommend using tsan for java.

https://wiki.openjdk.java.net/display/tsan/Main

But the types of races I struggle with in java I suspect are similarly hard in Rust.

Here's two pieces of concurrent code I struggled with:

https://github.com/google/guava/blob/master/guava/src/com/go...

https://github.com/google/guava/blob/master/guava/src/com/go...

I'm not sure reasoning about the correctness of those would be easier in Rust, but if there are any rust experts reading this I'd love your perspective.



Interesting - didn’t knew tsan is now available for Java. Which JDK version is it available for? The linked wiki isn’t super clear on this. But given it seems a 2020 Addition I guess only for rather recent ones.


Thanks, I haven’t seen tsan before. Java also has JML but I don’t know how much does it help regarding concurrency.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: