InternalStableApi on JavaDurationConverters (#29118)

This commit is contained in:
Patrik Nordwall 2020-05-26 09:47:24 +02:00 committed by GitHub
parent 3d377bec97
commit 4f0417e12e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View file

@ -78,15 +78,16 @@ object ExecutionContexts {
def global(): ExecutionContextExecutor = ExecutionContext.global
/**
* INTERNAL API
*
* WARNING: Not A General Purpose ExecutionContext!
*
* This is an execution context which runs everything on the calling thread.
* It is very useful for actions which are known to be non-blocking and
* non-throwing in order to save a round-trip to the thread pool.
*
* INTERNAL API
* Once Scala 2.12 is no longer supported this can be dropped in favour of directly using `ExecutionContext.parasitic`
*/
// Once Scala 2.12 is no longer supported this can be dropped in favour of directly using [[ExecutionContext.parasitic]]
@InternalStableApi
private[akka] val parasitic: ExecutionContext = SameThreadExecutionContext()

View file

@ -7,9 +7,12 @@ import java.time.{ Duration => JDuration }
import scala.concurrent.duration.{ Duration, FiniteDuration }
import akka.annotation.InternalStableApi
/**
* INTERNAL API
*/
@InternalStableApi
private[akka] object JavaDurationConverters {
def asFiniteDuration(duration: JDuration): FiniteDuration = duration.asScala