On Nov 29, 2013, at 4:11 AM, Ralf Buschermoehle wrote:
> you were right. postBreedingExchangePopulation(this) is not changing
>> One possibility: finishProducing is called once in each breeding thread. Do you have multiple breeding threads and if so are you causing a race condition?
> Yes, but it's strange that even when there is only one breeding thread
> this is a problem?
It is strange: I can't think of anything in ECJ that'd be doing it. My best guess is there's a bug on your side?
> Nevertheless I need all breeding threads to finish before I
If you want to do this multithreaded and need to do post-processing after all breeding has completed, finishProducing won't work -- it's per-thread.
The issue here is that different breeding techniques do things differently. If you're using SimpleBreeder, I'd make a SimpleBreeder subclass which overrides breedPopulation(...) to call super, then post-processes the population and returns it.