Can Kotlin coroutines be used in production, and what does their experimental status mean?
Can "experimental" Kotlin coroutines be used in production?
11.2k Views Asked by Roman Elizarov At
1
There are 1 best solutions below
Related Questions in KOTLIN
- Volatile properties in Kotlin?
- Using multiple JVM languages in the same project
- Kotlin - IntelliJ Project Setup
- Kotlin let analogue which returns the receiver
- Kotlin 'when' statement vs Java 'switch'
- Use Kotlin extension in android java class
- Kotlin stub/placeholder function for unimplemented code
- Partial class delegation in Kotlin
- SugarORM + Kotlin: Unresovled reference "listAll"
- Kotlin JS - string to number conversion?
- Where is the old Kotlin specification hosted?
- Kotlin JS - Accessing HTML DOM properties
- Access property delegate in Kotlin
- Kotlin-JS interop - using language constructs
- Does "internal" visibility modifier in Kotlin work yet?
Related Questions in COROUTINE
- Crystal convert the idea behind Thread pool to Fibers/spawn
- Lua - coroutines - official example
- Python: two "yield"s in one function
- Bluebird coroutine usage
- NullreferenceException when checking if point is visible
- Animation curve evaluate
- Future exception was never retrieved
- Unity UnityWebRequest Coroutine
- C++1z coroutine threading context and coroutine scheduling
- Coroutine call stacks
- Ask for a sample code to understand the return value of throw() in a coroutine which returns values
- How to break out of loop in coroutine after some player input?
- Run spider while web application running based on Python asyncio module
- How to do coverage on a python coroutine?
- Unity (C#) -> Kotlin <- Coroutines
Related Questions in KOTLIN-COROUTINES
- Kotlin Coroutines in Android Service
- Unresolved reference: launch
- Can "experimental" Kotlin coroutines be used in production?
- How to use code that relies on ThreadLocal with Kotlin coroutines
- What is the difference between launch/join and async/await in Kotlin coroutines
- Return value from Kotlin coroutines inside a non-suspended function
- Android: How to detect how long workmanager is already in enqueue mode?
- how to return a boolean after completion of coroutine?
- How to fix UI to Light mode
- Why does IO Dispatchers create more than 64 thread in Kotlin corotines?
- Call or Response in Retrofit?
- How to call Kotlin coroutine in composable function callbacks?
- Sub-collection request (Firestore, Coroutine)
- Is it possible to use @Transactional and kotlin coroutines in spring boot?
- How to make an Api call from a Custom View?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
UPDATE: Kotlin coroutines are no longer experimental as of Kotlin 1.3.
Kotlin coroutines can and should be used in production. That was the chief reason to officially release them in Kotlin 1.1. Having released them, the JetBrains team had committed to maintain backwards compatibility with respect to any changes that are introduced to them in the minor releases as they evolve, while allowing people to safely try them in complex production applications.
In short, the difference between “experimental” and “normal” features, is that for normal Kotlin features new stuff cannot be added in minor updates, because there is a "full compatibility" guarantee, while for experimental features new stuff can be added, but nothing can be removed (because of the backwards compatibility guarantee).
Experimental coroutines use a separate
kotlin.coroutines.experimentalpackage name, so that when coroutines design is finalized and they move tokotlin.coroutinespackage, old compiled code will not break, but will continue to work via a separate support library.Further discussion (long-read) about why they are "experimental" and what does this mean can be found in this forum post by Andrey Breslav.
The same question applies to coroutines support libraries.
The current version of
kotlinx.coroutinesis designed for production use. It is pretty well covered with tests, lots of things are already optimized, all the changes are made considering the issues of backwards compatibility with previously compiled code. It certainly does serve as a test-bed for various coroutine-based things, so there are some parts that are clearly marked as "work in progress" or "unstable" in the documentation of the corresponding functions and classes. However, by default, all the public APIs inkotlinx.coroutinesare considered to be stable and are being evolved, if needed, with appropriate migration aids.