Expand|Select|Wrap|Line Numbers
- MovAvg run = new MovAvg(_symbol, this, SumDays.SMALL );
- threadExecutor.execute(run);
- Collection<Double> vl = run.getMovAvg().values();
- Iterator itr = vl.iterator();
- while(itr.hasNext()){
- System.out.println(itr.next());
- }
In order to take back the results I try the to build a Collection and then generate an iterateion on the values of this collection.
First: I have a Null exception, which I believe it has to do with the fact, that the thread might not have started yet? If so, how can I handle that the next step will be executed right after the execution of the thread ? Well what I don't see is how to "plug-in" wait, notify thing...
Second: Is it right the way I am trying to collect the values? If I have secured that the thread will run before we reach to this point...
Thank you...