Skip to content
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

How to ? kotlinx.coroutines on android native. (Godot yield implementation) #1808

Closed
piiertho opened this issue Feb 16, 2020 · 1 comment
Closed

Comments

@piiertho
Copy link

piiertho commented Feb 16, 2020

Hi there !

This is more a question than an issue, I don't know if there's a better place to ask.

I am currently working with contributors on adapting Kotlin to godot’s GDNative, using kotlin cinterop: https://github.com/utopia-rise/godot-kotlin.


In gdscript (godot’s scripting language), there is a yield method, which is basically a coroutine. So we implement it for godot-kotlin using kotlin’s couroutines (see here).
We managed to get it working on every platforms, except android, as we cannot find a native implementation for android here

What I understand is that on android you have to use a JVM implementation of coroutines, to access Dispatchers.Main, according to the readme.
I’d like to know if we understand well the problem, and if you have any workaround to bring yield on godot-kotlin for android ?

Thank you for your time.

@piiertho piiertho changed the title How to ? kotlinx.coroutines for android native. (Godot yield implementation) How to ? kotlinx.coroutines on android native. (Godot yield implementation) Feb 16, 2020
@elizarov
Copy link
Contributor

We don't currently ship pre-compiled versions of kotlinx.coroutines for AndroidNative targets. See #812 for the relevant issue.

The main problem is that we lack the infrastructure to test such integration. If you know now to set up the tests for Android/Native toolchain, then you are welcome to contribute. It should start with support for AndoidNative targets in atomicfu project. See Kotlin/kotlinx-atomicfu#122

P.S. I'm closing this issue as a duplicate.

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