I'm not real good with multithreading, so please bare with me.
I'm using the following code to read a file that's in a
thread that's continuously running:
for (int i = 0, n = fsize; i<n; i++) {
buf[i] = (byte)dis.read();
}
I want to block all other threads until the for loop is completed.
How do I specify this?
If i put a synchronized{} block around it, will that do the trick?
Thanks,
Drew