Pause ForEach Loop using Thread
As you may have noticed I am new to this forum and ... I can admit yes even to java(even though I have knowledge in other languages). :)
I am having an issue with threads. What I am trying to do(an not managing is this)
I have a List of Objects which I am looping through. Once I find the Object I need from the List, I am storing it in another Object, Now what I need to do is stop the loop(using threads) until I change some properties of that Object using buttons(which I have implemented + their Listeners), Once the properties are modified I need to notify() the thread again to continue. Can some one please guide me through this process. I have searched google a lot for some sample code without success.
Re: Pause ForEach Loop using Thread
I'm not sure that threading is the way to go here, but if you're set on doing it anyway, I would take a look at the wait() and notify() methods in the concurrency tutorials.