I am new to this forum and i was just wondering if the following scenario is implementable.
Suppose a thread is reading a file and dividing it into chunks of data(lets say in the form of arraylist, where each line corresponds to a value in arraylist). Each chunk of data is associated with one thread and that thread is writing that data into a file. i want that as soon as ane line has been written,the lock should open and any thread can occupy the lock. is it possible? if yes can you provide a brief overview on how to tacle this problem.