I have two list a, b. One thread is adding the data into the list and start the timer if the timer is not already started.
Another thread is a timer Task thread that will wake up for every 5 secs to read the list and process as follows.
Could any clarify my questions in the comments of the code. if my logic is wrong please provide the better way to implement to avoid synchronization issue.
Another thread is a timer Task thread that will wake up for every 5 secs to read the list and process as follows.
Could any clarify my questions in the comments of the code. if my logic is wrong please provide the better way to implement to avoid synchronization issue.