View | Details | Raw Unified | Return to bug 48843
Collapse All | Expand All

(-)connectors/util/java/org/apache/tomcat/util/net/AprEndpoint.java (-8 / +7 lines)
Lines 923-940 Link Here
923
     */
923
     */
924
    protected Worker getWorkerThread() {
924
    protected Worker getWorkerThread() {
925
        // Allocate a new worker thread
925
        // Allocate a new worker thread
926
        Worker workerThread = createWorkerThread();
926
        synchronized (workers) {
927
        while (workerThread == null) {
927
            Worker workerThread;
928
            try {
928
            while ((workerThread = createWorkerThread()) == null) {
929
                synchronized (workers) {
929
                try {
930
                    workers.wait();
930
                    workers.wait();
931
                } catch (InterruptedException e) {
932
                    // Ignore
931
                }
933
                }
932
            } catch (InterruptedException e) {
933
                // Ignore
934
            }
934
            }
935
            workerThread = createWorkerThread();
935
            return workerThread;
936
        }
936
        }
937
        return workerThread;
938
    }
937
    }
939
938
940
939

Return to bug 48843