Join Slack
Communities
Powered by
it seems like it wouldn't be compatible with my cu...
# kotlin-native
s
spierce7
12/01/2017, 12:40 AM
it seems like it wouldn't be compatible with my current manner of using dependency injection.
o
olonho
12/01/2017, 6:16 AM
take a look on example of computation offload in spinner app, for example:
https://github.com/JetBrains/kotlinconf-spinner/blob/7259a4f10488df76b0a4c9977bae2ff190a3bfc7/kotlin-native/samples/fullstack/clients/android/src/main/kotlin/StatsFetcherImpl.kt#L20
s
spierce7
12/01/2017, 5:01 PM
but everything being transferred to the worker for the background thread has to be created here?
{ WorkerArgument("$url", cookiesFileName()) }
spierce7
12/01/2017, 5:01 PM
in that lambda?
spierce7
12/01/2017, 5:10 PM
It also doesn't look like workers can be extended. So workers can't have there own state?
spierce7
12/01/2017, 5:10 PM
Any state I need to compute a background task, like an Actor or something that owns the running of the background data, I have to pass in each time?
o
olonho
12/04/2017, 6:34 AM
worker can have their own state, see
https://github.com/JetBrains/kotlin-native/blob/4a02ab2939cc2b24e4f381b5e08762432cbc6682/samples/videoplayer/src/main/kotlin/DecoderWorker.kt#L24
4
Views
Open in Slack
Previous
Next