public class Signal2NoiseRatio
{
public ImagePlus SingleSNR(ImagePlus imagePlus) throws InterruptedException
{
new Thread()
{
@Override public void run()
{
for (int i = 0; i <= 1; i++)
{
System.out.println("in queue"+i);
}
synchronized( this )
{
this.notify();
}
}
}.start();
synchronized (this)
{
this.wait();
}
return imagePlusToProcess;
}
}
notify()
does not reach wait()
.
what's wrong here?
It is essential for me that both synchonized methods in this one method are implemented.
the main thread perform a frame which presents an image in it. Is it possible that the wait()
method leads the frame to a white window?