I\'ve created a linked list in java using generics, and now I want to be able to iterate over all the elements in the list. In C# I would use yield return insid
If you want the full functionality of yield return, you probably need to set this up in two threads-- one for the first method, and one for the second. Then the first thread should wait until the second thread puts its value somewhere accessible and notifys it that it's ready. Then the first thread would process that value, wait for the next value, etc.