tweeked fences?
This commit is contained in:
@@ -29,9 +29,7 @@ public class TimingStatistics {
|
||||
throw new IllegalStateException();
|
||||
}
|
||||
this.running = true;
|
||||
VarHandle.fullFence();
|
||||
this.timestamp = System.nanoTime();
|
||||
VarHandle.fullFence();
|
||||
}
|
||||
|
||||
public void stop() {
|
||||
@@ -39,9 +37,7 @@ public class TimingStatistics {
|
||||
throw new IllegalStateException();
|
||||
}
|
||||
this.running = false;
|
||||
VarHandle.fullFence();
|
||||
this.runtime += System.nanoTime() - this.timestamp;
|
||||
VarHandle.fullFence();
|
||||
}
|
||||
|
||||
public void subtract(TimeSampler sampler) {
|
||||
|
||||
@@ -74,8 +74,6 @@ public class ModelBakerySubsystem {
|
||||
}
|
||||
}*/
|
||||
//TimingStatistics.modelProcess.start();
|
||||
long start = System.nanoTime();
|
||||
VarHandle.fullFence();
|
||||
if (this.blockIdCount.get() != 0) {
|
||||
long budget = Math.min(totalBudget-150_000, totalBudget-(this.factory.resultJobs.size()*10_000L))-150_000;
|
||||
|
||||
@@ -100,7 +98,7 @@ public class ModelBakerySubsystem {
|
||||
|
||||
this.factory.tick();
|
||||
|
||||
start = System.nanoTime();
|
||||
long start = System.nanoTime();
|
||||
while (!this.factory.resultJobs.isEmpty()) {
|
||||
this.factory.resultJobs.poll().run();
|
||||
if (totalBudget<(System.nanoTime()-start))
|
||||
|
||||
@@ -130,9 +130,9 @@ public class ActiveSectionTracker {
|
||||
}
|
||||
|
||||
section.acquire();
|
||||
VarHandle.fullFence();//Do not reorder setting this object
|
||||
VarHandle.storeStoreFence();//Do not reorder setting this object
|
||||
holder.obj = section;
|
||||
VarHandle.fullFence();
|
||||
VarHandle.releaseFence();
|
||||
if (nullOnEmpty && status == 1) {//If its air return null as stated, release the section aswell
|
||||
section.release();
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user