InternalStableApi on JavaDurationConverters (#29118)
This commit is contained in:
parent
3d377bec97
commit
4f0417e12e
2 changed files with 6 additions and 2 deletions
|
|
@ -78,15 +78,16 @@ object ExecutionContexts {
|
||||||
def global(): ExecutionContextExecutor = ExecutionContext.global
|
def global(): ExecutionContextExecutor = ExecutionContext.global
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* INTERNAL API
|
||||||
|
*
|
||||||
* WARNING: Not A General Purpose ExecutionContext!
|
* WARNING: Not A General Purpose ExecutionContext!
|
||||||
*
|
*
|
||||||
* This is an execution context which runs everything on the calling thread.
|
* 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
|
* 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.
|
* 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
|
@InternalStableApi
|
||||||
private[akka] val parasitic: ExecutionContext = SameThreadExecutionContext()
|
private[akka] val parasitic: ExecutionContext = SameThreadExecutionContext()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,9 +7,12 @@ import java.time.{ Duration => JDuration }
|
||||||
|
|
||||||
import scala.concurrent.duration.{ Duration, FiniteDuration }
|
import scala.concurrent.duration.{ Duration, FiniteDuration }
|
||||||
|
|
||||||
|
import akka.annotation.InternalStableApi
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* INTERNAL API
|
* INTERNAL API
|
||||||
*/
|
*/
|
||||||
|
@InternalStableApi
|
||||||
private[akka] object JavaDurationConverters {
|
private[akka] object JavaDurationConverters {
|
||||||
def asFiniteDuration(duration: JDuration): FiniteDuration = duration.asScala
|
def asFiniteDuration(duration: JDuration): FiniteDuration = duration.asScala
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue