It's about a year that I have been coding on Java but I still have basic problems working with threads. My main concern is that I can't understand the logic they obey in their behaviour. I know that they are processes which run independently but I don't know how to join their results or make them communicate with each other. I also have difficulties working with threads with different priorities mainly related to input-output procedures which never seem to run synchronised with other parts of code. Also taking use of synchronised blocks, does not always lead to a result in which the code inside the block is not interrupted by any other procedure. I'm not convenient with where I should use wait, sleep, join.... It seems like even using these tricks does not work when I want to interrupt a higher priority thread with a lower one. I will be thankful if you could guide me!

Recommended Answers

please read/check/write code, then ask specific question(s), your descriptions fully covered these links:


Jump to Post

All 2 Replies

Thank you. Both of links were really useful.
I also wanted to know your idea about if dealing with high level concurrency objects is going to be useful for me before getting convenient with working with threads at this level. Will I achieve better results if I develop my knowledge about all types of concurrency objects together or not?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.