Reputation: 581
I am going to make an android game engine, primary using native C++. I want to use threading and I don't want to implement it in Java, because of the JNI's slowness. Are there any stable native threading APIs for Android, I could use?
Upvotes: 2
Views: 2567
Reputation: 28756
I did some research on the topic (threading support in Android NDK) today, and it seems the options are as follows:
C++11 has native threading support on Android
Posix Threads (aka pthread).
Boost is available on Android, and includes threading support.
Poco is available on Android, and includes threading support.
Upvotes: 6
Reputation: 999
You can also try the threads (Boost.Thread) of Boost for Android.
I don't want to implement it in Java, because of the JNI's slowness
According to the first post here, going native is not always going to make your code run faster (you may be still calling Java code from your C++ under the hood).
Upvotes: 0