From 06a5774528f3fce6550cac950fac89d1a51c53db Mon Sep 17 00:00:00 2001 From: Alexey Kudravtsev Date: Fri, 2 Oct 2015 14:31:11 +0300 Subject: [PATCH] removed unused --- .../impl/TransferToPooledThreadQueue.java | 48 ------------------- 1 file changed, 48 deletions(-) delete mode 100644 platform/platform-impl/src/com/intellij/openapi/application/impl/TransferToPooledThreadQueue.java diff --git a/platform/platform-impl/src/com/intellij/openapi/application/impl/TransferToPooledThreadQueue.java b/platform/platform-impl/src/com/intellij/openapi/application/impl/TransferToPooledThreadQueue.java deleted file mode 100644 index d07aeb2b6e6e..000000000000 --- a/platform/platform-impl/src/com/intellij/openapi/application/impl/TransferToPooledThreadQueue.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2000-2015 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.intellij.openapi.application.impl; - -import com.intellij.openapi.util.Condition; -import com.intellij.util.Processor; -import com.intellij.util.concurrency.BoundedTaskExecutor; -import com.intellij.util.containers.TransferToEDTQueue; -import org.jetbrains.annotations.NonNls; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.ide.PooledThreadExecutor; - -import java.util.concurrent.Executor; - -/** - * Passes elements for processing in the dedicated thread. - * Processes elements in batches, no longer than {maxUnitOfWorkThresholdMs}ms per batch, and reschedules processing later for longer batches. - * Usage: {@link #offer(Object)}} : schedules element for processing in a pooled thread - */ -public class TransferToPooledThreadQueue extends TransferToEDTQueue { - private final Executor myExecutor; - - public TransferToPooledThreadQueue(@NonNls @NotNull String name, - @NotNull Condition shutUpCondition, - int maxUnitOfWorkThresholdMs, - @NotNull Processor processor) { - super(name, processor, shutUpCondition, maxUnitOfWorkThresholdMs); - myExecutor = new BoundedTaskExecutor(PooledThreadExecutor.INSTANCE, 1); - } - - @Override - protected void schedule(@NotNull Runnable updateRunnable) { - myExecutor.execute(updateRunnable); - } -}