Question
I'm attempting to use std::thread from the C++11 standard in my Tizen application, but I encountered the following errors:
launchpad.c:__send_result_to_caller(***)> error found when launching with XXX
launchpad.c:__send_result_to_caller(***)> The app process might be terminated while waiting XXX
launchpad.c:__send_result_to_caller(***)> process launched, but cmdline not changed
I couldn't find any official documentation confirming Tizen's support for std::thread. Does this mean that only ecore_thread_* functions and pthread can be used for creating multithreaded applications in Tizen?
Answer
Problem Understanding
The user is trying to implement multithreading in a Tizen native application using C++11's std::thread, but encountered runtime errors. The question seeks clarification on whether std::thread is supported in Tizen and what alternative threading options are available.
Solution Methods
-
Threading Support in Tizen:
- Tizen primarily supports C and HTML5 for application development
- While Tizen does support C++ development, not all C++11 features are fully supported
- The std::thread implementation may not be fully functional in Tizen's environment
-
Recommended Alternatives:
- Ecore_Thread: Tizen's native threading API specifically designed for Tizen applications
- pthread: The POSIX thread library which is widely supported in Tizen
Code Examples
// Example using pthread
#include <pthread.h>
void* thread_function(void* arg) {
// Thread logic here
return NULL;
}
int main() {
pthread_t thread_id;
pthread_create(&thread_id, NULL, thread_function, NULL);
pthread_join(thread_id, NULL);
return 0;
}
Additional Tips
- When developing native applications for Tizen, it's recommended to use the officially supported threading APIs (Ecore_Thread or pthread)
- Always check the latest Tizen documentation for updates on C++ support
- For better compatibility and performance, consider using Tizen's native APIs rather than standard C++ features