mirror of
https://github.com/actiontech/dble.git
synced 2026-01-06 04:40:17 -06:00
fix support concurrency
This commit is contained in:
@@ -457,11 +457,13 @@ public final class DbleServer {
|
||||
}
|
||||
|
||||
public NIOProcessor nextFrontProcessor() {
|
||||
int i = ++nextFrontProcessor;
|
||||
if (i >= frontProcessors.length) {
|
||||
i = nextFrontProcessor = 0;
|
||||
synchronized (this) {
|
||||
int i = ++nextFrontProcessor;
|
||||
if (i >= frontProcessors.length) {
|
||||
i = nextFrontProcessor = 0;
|
||||
}
|
||||
return frontProcessors[i];
|
||||
}
|
||||
return frontProcessors[i];
|
||||
}
|
||||
|
||||
public NIOProcessor nextBackendProcessor() {
|
||||
|
||||
Reference in New Issue
Block a user