Clean up same thread execution contexts #26690
* deprecate internal sameThread ec and use a new one for all internal use sites * Use the respective Scala version standard library "same thread" ec * fallback to the old inline impl on 2.12 when reflection isn't possible
This commit is contained in:
parent
59ce257209
commit
d26453b5e8
45 changed files with 248 additions and 165 deletions
|
|
@ -398,7 +398,7 @@ import scala.util.control.NonFatal
|
|||
.foreach {
|
||||
case NonFatal(e) => p.tryFailure(e)
|
||||
case _ => ()
|
||||
}(akka.dispatch.ExecutionContexts.sameThreadExecutionContext)
|
||||
}(akka.dispatch.ExecutionContexts.parasitic)
|
||||
p.future
|
||||
}
|
||||
override def cancel(): Unit = {
|
||||
|
|
@ -572,7 +572,7 @@ import scala.util.control.NonFatal
|
|||
failStage(e)
|
||||
}
|
||||
try {
|
||||
sinkFactory(element).onComplete(cb.invoke)(ExecutionContexts.sameThreadExecutionContext)
|
||||
sinkFactory(element).onComplete(cb.invoke)(ExecutionContexts.parasitic)
|
||||
} catch {
|
||||
case NonFatal(e) =>
|
||||
promise.failure(e)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue