Remove useless synchronized operation

This commit is contained in:
sandtechnology committed 2021-07-12 12:00:17 +08:00
1 parent ba30e1b64b
commit 20162b3f64
1 file changed
+1 -5
@@ -148,7 +148,6 @@ public class DatabaseManager {
* Internal method, runTasks in queue.
*/
private synchronized void runTask() { // synchronized for QUICKSHOP-WX
synchronized (sqlQueue) {
if (sqlQueue.isEmpty()) {
return;
}
@@ -199,7 +198,6 @@ public class DatabaseManager {
} finally {
dbconnection.release();
}
}
// try {
// this.database.getConnection().commit();
@@ -229,9 +227,7 @@ public class DatabaseManager {
*/
public void addDelayTask(DatabaseTask task) {
if (useQueue) {
synchronized (sqlQueue) {
sqlQueue.offer(task);
}
sqlQueue.offer(task);
} else {
runInstantTask(task);
}