Tristan Caron
12/14/2018, 4:54 PMkotlinx.coroutines
. What is the base? I suppose Deferred
is internally using Promise
, but what about Job
? Is it working with Worker
?gildor
12/14/2018, 5:44 PMgildor
12/14/2018, 5:44 PMgildor
12/14/2018, 5:45 PMgildor
12/14/2018, 5:46 PMTristan Caron
12/14/2018, 5:53 PMgildor
12/15/2018, 2:49 AMTristan Caron
12/16/2018, 12:22 PMgildor
12/16/2018, 1:40 PMgildor
12/16/2018, 1:42 PMTristan Caron
12/16/2018, 2:35 PMgildor
12/16/2018, 4:10 PMTristan Caron
12/16/2018, 7:16 PMval personA = Person()
GlobalScope.launch {
val personB = Person()
}
Will generate
- main_code.js
- person_class.js
- worker_code.js
- kotlin.js
person_class.js
because it is used in the two threads.
And if we detect that kind of code
val service = Service()
GlobalScope.launch {
val person = service.getPerson()
}
The plugin should generate the code for the communication between the two process.
So maybe it's better to wait for WASM and have built-in solutions 🙂
WebKit team had a proposal https://webkit.org/blog/7846/concurrent-javascript-it-can-work/