For further actions, you may consider blocking this person and/or reporting abuse
Read next
Create an AWS SNS Topic Using CDK and consume messages with a Spring Boot Microservice
Kevin Lactio Kemta -
How to Start DSA (Data Structures & Algorithms) as a Beginner
Harshit Singh -
How to Remove Class Symbols (Green Circles) from the Eclipse Package Explorer
JavaFullStackDev.in -
Share us your project for Hacktoberfest 2024! 🎃
Thomas Bnt ☕ -
Top comments (4)
Threading issues are very difficult to reproduce, which is one of the reason you should design the application to minimize these issues. Immutable objects are your friend. Try to keep mutable objects to single threads and then carefully make sure that when exchanging it between threads is handled well. Think handing the object over to another thread vs lets share. If you need to share make sure they are fully synchronized objects.
Live locks - Are quite difficult to debug the way to debug them is tail your logs whilst the application is running and see them.
Deadlocks - A little easier to debug, you can get a stack trace when deadlocked. Then you can trace that back to the code and redesign the problem. The only problem is you may not get the same results twice but overall it should be fairly obvious.
Race conditons - Use something like ThreadSafe They are incredible difficult to detect usually you would find them in code review without pushing them live however sometimes they sneak through. Using Threadsafe can help with the detection whilst coding.
hope this help!
Thanks it is helpful
I think you really need to understand how threads work (in general), concurrency theory, etc.
Multi-threading is hard 😜
I would focus on the theory and not necessarily Java in particular. Once you've got that down then start applying it to Java?
Thanks ,Yes theory ll be very helpful