INNER CODE UNIT · Java

findMinLoadThread

RuedigerMoeller/kontraktor · attic/ElasticScheduler.java:334

    private DispatcherThread findMinLoadThread(int minLoad, DispatcherThread dispatcherThread) {
        synchronized (balanceLock) {
            DispatcherThread minThread = null;
            for (int i = 0; i < threads.length; i++) {
                DispatcherThread thread = threads[i];
                if (thread != null && thread != dispatcherThread) {
                    int load = thread.getLoad();
                    if (load < minLoad) {
                        minLoad = load;
                        minThread = thread;
                    }
                }
            }
            return minThread;
        }
    }

    private DispatcherThread createNewThreadIfPossible() {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…