Hacker News new | ask | show | jobs
by MrUssek 2158 days ago
This reminds me of a POC I did to serialize Kotlin continuation state in order to achieve something similar with Kotlin coroutines. The main issue with that approach is that the continuation context can end up closing over a huge variety of types (since it has to serialize the entire asynchronous stack). There was some discussion in this issue (https://github.com/Kotlin/kotlinx.coroutines/issues/76) about annotating suspend functions so that their continuation only closes over objects compatible with Kotlin serialization. This approach removes the requirement for all non-determinism in the code to go through some kind of framework, which seems like a plus.

I think in the future what will happen is someone will build a language with CSP style concurrency that deals with the "update-in-flight" and "persistence" problems. Essentially extending the notion of a programming language runtime from "once, here, on this computer, right now", to something much broader.

1 comments

In the future WebAssembly will do it out of the box.