The sleep didn't actually do much of anything....

This commit is contained in:
T00thpick1 2013-03-08 20:34:38 -05:00 committed by NuclearW
parent aeae60f968
commit 3f22a8f479
4 changed files with 2 additions and 7 deletions

View File

@ -59,7 +59,6 @@ public class Config extends AutoUpdateConfigLoader {
public String getMySQLUserName() { return getStringIncludingInts(config, "MySQL.Database.User_Name"); }
public int getMySQLServerPort() { return config.getInt("MySQL.Server.Port", 3306); }
public String getMySQLServerName() { return config.getString("MySQL.Server.Address", "localhost"); }
public long getQueueThrottle() { return config.getLong("MySQL.QueueThrottle", 100L); }
public String getMySQLUserPassword() {
if (getStringIncludingInts(config, "MySQL.Database.User_Password") != null) {

View File

@ -7,12 +7,10 @@ public class AsyncQueueManager implements Runnable {
private LinkedBlockingQueue<Queueable> queue;
private boolean running;
private long throttle;
public AsyncQueueManager(long throttle) {
public AsyncQueueManager() {
this.queue = new LinkedBlockingQueue<Queueable>();
this.running = true;
this.throttle = throttle;
}
@Override
@ -20,7 +18,6 @@ public class AsyncQueueManager implements Runnable {
while(running) {
try {
queue.take().run();
Thread.sleep(throttle);
} catch (InterruptedException e) {
e.printStackTrace();
}

View File

@ -459,7 +459,7 @@ public class mcMMO extends JavaPlugin {
scheduler.scheduleSyncRepeatingTask(this, new BleedTimerTask(), 40, 40);
if (Config.getInstance().getUseMySQL()) {
queueManager = new AsyncQueueManager(Config.getInstance().getQueueThrottle());
queueManager = new AsyncQueueManager();
scheduler.runTaskAsynchronously(this, queueManager);
}

View File

@ -48,7 +48,6 @@ MySQL:
Server:
Port: 3306
Address: localhost
QueueThrottle: 100L
#
# Settings for Hardcore mode
###