Skip to content

0.2-alpha-1 doesn't work with Kotlin 1.1-M03 #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
cjkent opened this issue Dec 21, 2016 · 0 comments
Closed

0.2-alpha-1 doesn't work with Kotlin 1.1-M03 #15

cjkent opened this issue Dec 21, 2016 · 0 comments
Assignees

Comments

@cjkent
Copy link

cjkent commented Dec 21, 2016

README.md was recently changed so that the Maven and Gradle snippets include 0.2-alpha-1 instead of 0.1-alpha-2. Most users of Kotlin 1.1 are likely to be using 1.1-M03 as that's what is available in IntelliJ and bintray.

README.md should be clear about which versions are compatible with which Kotlin versions. I only figured it out by looking at the commit history and going back to the previous version.

@ilya-g ilya-g self-assigned this Dec 21, 2016
XinyueZ added a commit to XinyueZ/kotlinx.coroutines that referenced this issue Sep 17, 2018
Run on java9(9.0.4)
The log(msg: String) doesn't work like the description in document.

`fun log(msg: String) = println("[${Thread.currentThread().name}] $msg")`

The output is not same like expected in document:

```
[main] Unconfined
[ForkJoinPool.commonPool-worker-2] Default
[main] main runBlocking
[MyOwnThread] newSingleThreadContext
[kotlinx.coroutines.DefaultExecutor] Unconfined
```
I change to:

`fun log(msg: String) = Thread.currentThread().run { println("[$name @coroutine#$id] $msg") }`

output:

```
[main @coroutineKotlin#1] Unconfined
[ForkJoinPool.commonPool-worker-2 @coroutineKotlin#15] Default
[main @coroutineKotlin#1] main runBlocking
[MyOwnThread @coroutineKotlin#17] newSingleThreadContext
[kotlinx.coroutines.DefaultExecutor @coroutineKotlin#13] Unconfined
```
XinyueZ added a commit to XinyueZ/kotlinx.coroutines that referenced this issue Sep 17, 2018
Run on java9(9.0.4)
The log(msg: String) doesn't work like the description in document.

`fun log(msg: String) = println("[${Thread.currentThread().name}] $msg")`

The output is not same like expected in document:

```
[main] Unconfined
[ForkJoinPool.commonPool-worker-2] Default
[main] main runBlocking
[MyOwnThread] newSingleThreadContext
[kotlinx.coroutines.DefaultExecutor] Unconfined
```
I change to:

`fun log(msg: String) = Thread.currentThread().run { println("[$name @coroutine#$id] $msg") }`

output:

```
[main @coroutineKotlin#1] Unconfined
[ForkJoinPool.commonPool-worker-2 @coroutineKotlin#15] Default
[main @coroutineKotlin#1] main runBlocking
[MyOwnThread @coroutineKotlin#17] newSingleThreadContext
[kotlinx.coroutines.DefaultExecutor @coroutineKotlin#13] Unconfined
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants