Skip to content

Commit 4e42a57

Browse files
committed
refactor: Remove unused class
1 parent c7a82dd commit 4e42a57

1 file changed

Lines changed: 0 additions & 35 deletions

File tree

frontend/src/main/scala/bloop/bsp/BspServer.scala

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import java.nio.file.NoSuchFileException
66
import java.util.concurrent.ConcurrentHashMap
77
import java.util.concurrent.TimeUnit
88

9-
import scala.concurrent.Future
109
import scala.concurrent.Promise
1110
import scala.util.control.NonFatal
1211

@@ -22,15 +21,11 @@ import bloop.logging.DebugFilter
2221
import bloop.task.Task
2322

2423
import jsonrpc4s._
25-
import monix.execution.Ack
26-
import monix.execution.Cancelable
2724
import monix.execution.CancelablePromise
2825
import monix.execution.Scheduler
2926
import monix.execution.atomic.Atomic
3027
import monix.reactive.Observable
31-
import monix.reactive.Observer
3228
import monix.reactive.OverflowStrategy
33-
import monix.reactive.observers.Subscriber
3429
import monix.reactive.subjects.BehaviorSubject
3530

3631
object BspServer {
@@ -218,34 +213,4 @@ object BspServer {
218213
}
219214
}
220215

221-
final class PumpOperator[A](pumpTarget: Observer.Sync[A], runningFuture: Cancelable)
222-
extends Observable.Operator[A, A] {
223-
def apply(out: Subscriber[A]): Subscriber[A] =
224-
new Subscriber[A] { self =>
225-
implicit val scheduler = out.scheduler
226-
private[this] val isActive = Atomic(true)
227-
228-
def onNext(elem: A): Future[Ack] =
229-
out.onNext(elem).syncOnContinue {
230-
// Forward and ignore ack; safe because observer is sync
231-
pumpTarget.onNext(elem)
232-
()
233-
}
234-
235-
def onComplete(): Unit = {
236-
if (isActive.getAndSet(false))
237-
out.onComplete()
238-
}
239-
240-
def onError(ex: Throwable): Unit = {
241-
if (isActive.getAndSet(false)) {
242-
// Complete instead of forwarding error so that completeL finishes
243-
out.onComplete()
244-
runningFuture.cancel()
245-
} else {
246-
scheduler.reportFailure(ex)
247-
}
248-
}
249-
}
250-
}
251216
}

0 commit comments

Comments
 (0)