Hi,
I have worked on
java but not in multithreading issue. Currently in my organization there is requirement where file will be read by multiple
thread and need to ensure that first thread t3,t2 and t1 will read the file and after that rest of thread could start reading.
I am able to achieve the first scenario with join() method but when thread t4,t5 and t6 start reading file result in not what is expected. for example T4 is not finished with synchronized readFile() method and t5 start executing synchronized readFile() method.
I am sharing my code, could someone help where I am missing.