Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-12-26 02:50:06 +01:00
Make blocking executor a fair policy
Safer if we're submitting lots of chunks for recursive operations. These chunks should be handled in the order they're submitted so we don't handle a chunk that's been submitted twice (possible) in the wrong order
Dieser Commit ist enthalten in:
Ursprung
66e22df3f4
Commit
ce915fe04d
@ -559,7 +559,7 @@ public enum FaweCache implements Trimable {
|
|||||||
*/
|
*/
|
||||||
public ThreadPoolExecutor newBlockingExecutor() {
|
public ThreadPoolExecutor newBlockingExecutor() {
|
||||||
int nThreads = Settings.IMP.QUEUE.PARALLEL_THREADS;
|
int nThreads = Settings.IMP.QUEUE.PARALLEL_THREADS;
|
||||||
ArrayBlockingQueue<Runnable> queue = new ArrayBlockingQueue<>(nThreads);
|
ArrayBlockingQueue<Runnable> queue = new ArrayBlockingQueue<>(nThreads, true);
|
||||||
return new ThreadPoolExecutor(nThreads, nThreads,
|
return new ThreadPoolExecutor(nThreads, nThreads,
|
||||||
0L, TimeUnit.MILLISECONDS, queue,
|
0L, TimeUnit.MILLISECONDS, queue,
|
||||||
Executors.defaultThreadFactory(),
|
Executors.defaultThreadFactory(),
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren