From: "Matthew K. Williams" Date: 2010-04-07T23:02:23+09:00 Subject: Re: modifying a Hash in one process when .each is running in another On Wed, 7 Apr 2010, Nathan wrote: > Thanks for the clarification... My application is network based, and > some operations take several seconds. generate_list_of_objects takes > anything between 2 and 15 seconds, so I wouldn't like to have my whole > program on hold while that's happening. Each test process takes a few > seconds too, so if the object is no longer on the list, it isn't a > particularly bad thing if test tries to run, but it'll take up a lot > of time unnecessarily. > > I'm trying to work out if there's another way of doing it then. > Perhaps I'll modify the test method so that it knows if the current > object is on the list, and only runs the test if it is. > Nathan Might a messaging queue work better? That way you don't have the concurrency issues, as well as the issues with changing a hash in the middle of iteration. Matt