Attempt to fix stupid concurrency issue by force stealing jobs
This commit is contained in:
@@ -129,7 +129,9 @@ public class ServiceThreadPool {
|
|||||||
|
|
||||||
void steal(ServiceSlice service, int count) {
|
void steal(ServiceSlice service, int count) {
|
||||||
this.totalJobWeight.addAndGet(-(service.weightPerJob*(long)count));
|
this.totalJobWeight.addAndGet(-(service.weightPerJob*(long)count));
|
||||||
this.jobCounter.acquireUninterruptibly(count);
|
for (int i = 0; i < count; i++) {
|
||||||
|
this.jobCounter.acquireUninterruptibly();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void worker(int threadId) {
|
private void worker(int threadId) {
|
||||||
|
|||||||
Reference in New Issue
Block a user