https://kotlinlang.org logo
#coroutines
Title
# coroutines
k

kevinherron

08/03/2017, 9:22 PM
@elizarov at the end of your talk you mention that you’re working on an IO library - is that work happening in the open anywhere?
e

elizarov

08/03/2017, 9:31 PM
@cy is working on that
k

kevinherron

08/04/2017, 2:45 PM
@cy can you talk about this?
c

cy

08/08/2017, 12:25 PM
@kevinherron sure
it's just still under development
k

kevinherron

08/08/2017, 1:11 PM
Openly? Do you need users or contributors?
e

elizarov

08/08/2017, 1:12 PM
the plan is to fold it into
kotlinx.corouties
. It is currently in a separate branch, pending review and merge: https://github.com/Kotlin/kotlinx.coroutines/pull/99
👍 1
k

kevinherron

08/16/2017, 10:38 PM
will there eventually be a
SocketChannel
or some such implementation or is this intended to be a buffers only?
e

elizarov

08/17/2017, 7:34 AM
There will be an ability to connect channel to a socket (a channel for reading, a channel for writing). They will be always buffered, e.g. write a bunch of data to channel, then flush, then it goes to socket.
k

kevinherron

08/17/2017, 3:48 PM
any chance it will be a socket abstraction rather than a
java.net.Socket
? I have this dream of doing network I/O in coroutine-based pure Kotlin that can at some point be multiplatform rather than JVM-specific…
e

elizarov

08/17/2017, 3:52 PM
We don’t plan to expose java.net.Socket, because it is all riddled with blocking APIs
👍 1
k

kevinherron

08/17/2017, 3:56 PM
I have a lot of backend network code and protocol stack implementations. Right now I use netty, but I’d love to be able to move to pure Kotlin + coroutines, and as a bonus have the possibility to write the protocol stacks in a multi-platform compatible manner
mostly with an eye towards Kotlin/Native, not JS
e

elizarov

08/17/2017, 4:24 PM
Yes. That is exactly why we are undertaking this effort. For cross-platformness, that is. This way, we plan to be able to share all protocol code between platforms
👏 1
k

kevinherron

08/17/2017, 4:28 PM
fantastic. I’d like to help in any way possible, even if it’s just being an early adopter/tester
3 Views