renaming whole package to org.apg to simplifiy name

This commit is contained in:
Dominik
2012-03-09 16:27:29 +01:00
parent df6933bfb8
commit 8452fb62b7
69 changed files with 1914 additions and 1628 deletions

View File

@@ -0,0 +1,35 @@
package org.apg;
public class PausableThread extends Thread {
private boolean mPaused = false;
public PausableThread(Runnable runnable) {
super(runnable);
}
public void pause() {
synchronized (this) {
mPaused = true;
while (mPaused) {
try {
wait();
} catch (InterruptedException e) {
// ignore
}
}
}
}
public void unpause() {
synchronized (this) {
mPaused = false;
notify();
}
}
public boolean isPaused() {
synchronized (this) {
return mPaused;
}
}
}