v0.9 preparations. (#1962)
This commit is contained in:
@@ -1,3 +1,13 @@
|
||||
# v0.9 (Sep 2018)
|
||||
* Support Kotlin 1.3M2
|
||||
* Major standard library (native parts) rework and rename
|
||||
* New Gradle plugin with multiplatform integration and reworked DSL
|
||||
* Support unsigned types in Kotlin and interop
|
||||
* Support non-experimental coroutines API (kotlin.coroutines)
|
||||
* Top level object var/val can only be accessed from the main thread
|
||||
* Support lazy properties in singleton objects
|
||||
* Update LLVM to 6.0.1
|
||||
|
||||
## v0.8 (Jul 2018)
|
||||
* Singleton objects are frozen after creation, and shared between threads
|
||||
* String and primitives types are frozen by default
|
||||
|
||||
+8
-1
@@ -15,10 +15,17 @@ an `InvalidMutabilityException` is thrown.
|
||||
|
||||
To achieve `mutable XOR global` invariant all globally visible state (currently,
|
||||
`object` singletons and enums) are automatically frozen. If an object freezing
|
||||
is not desirable, `konan.ThreadLocal` annotation could be used, which will make
|
||||
is not desirable, `kotlin.native.ThreadLocal` annotation could be used, which will make
|
||||
object state thread local, and thus, mutable (but changed state not visible to
|
||||
other threads).
|
||||
|
||||
Top level/global variables of non-primitive types are by default accessible in the
|
||||
main thread (i.e. thread which initialized _Kotlin/Native_ runtime first) only.
|
||||
Access from another thread leads to an `IncorrectDereferenceException` being thrown.
|
||||
To make such variables accessible in other threads either `@ThreadLocal` annotation,
|
||||
marking value thread local or `@SharedImmutable`, making value frozen, and accessible
|
||||
from other threads, can be used.
|
||||
|
||||
Class `AtomicReference` could be used to publish changed frozen state to
|
||||
other threads, and thus build patterns like shared caches.
|
||||
|
||||
|
||||
+2
-2
@@ -389,8 +389,8 @@ Note that some function types are not supported currently. For example,
|
||||
it is not possible to get pointer to function that receives or returns structs
|
||||
by value.
|
||||
|
||||
If the callback doesn't run in the main thread it is mandatory to init the konan runtime
|
||||
by calling `konan.initRuntimeIfNeeded()`.
|
||||
If the callback doesn't run in the main thread it is mandatory to init the _Kotlin/Native_
|
||||
runtime by calling `kotlin.native.initRuntimeIfNeeded()`.
|
||||
|
||||
#### Passing user data to callbacks ####
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ internal fun ThrowIllegalCharacterConversionException(): Nothing {
|
||||
@ExportForCppRuntime
|
||||
internal fun ThrowIncorrectDereferenceException() {
|
||||
throw IncorrectDereferenceException(
|
||||
"Trying to access top level value not marked as @ThreadLocal or @ImmutableShared from non-main thread")
|
||||
"Trying to access top level value not marked as @ThreadLocal or @SharedImmutable from non-main thread")
|
||||
}
|
||||
|
||||
@ExportForCppRuntime
|
||||
|
||||
Reference in New Issue
Block a user