What is the correct way to implement concurrency in Java applications? I know about Threads, etc., Of course, I have been programming for Java for 10 years, but did not have much experience with concurrency.
For example, I have to load several resources asynchronously, and only after all of them have been loaded can I continue to work and do more work. Needless to say, there is no order how they finish. How to do it?
In JavaScript, I like to use the jQuery.deferred to say
$.when(deferred1,deferred2,deferred3...) .done( function(){
But what should I do in Java?
java multithreading concurrency
f.khantsis
source share