语言

Menu
Sites
Language
sending sms in thread crashing application

I am able to send sms successfully without using thread, if i use thread , application is crashing . can i know reason ?

响应

3 回复
Seongwon Cho

I think you would better describe your implementation more detaily.

I think nobody can guess why your application was crashed if you use thread.

Your implementation is thread safe ?

Carsten Haitzler

i am not sure if tizen messaging apis are threadsafe. if they call efl calls eg to do things with mainloop - then they are not. you can use threads, but in specific ways.

pius lee

I think you would have been use messages_open_service.

Ok, I looked up flow of this function.

messages_open_service

   -> msg_reg_sent_status_callback

-> MsgHandle::regSentStatusCallback

-> MsgProxyListener::start

-> g_io_add_watch

Yes! this function use g main loop.

Maybe your application use ecore mainloop base on g main loop, but you can't use g_io_add_watch in another thread except main loop.

I think most of tizen api is near resemble.

I recommend use tizen API in default thread, but you can use another thread for your own logic.

Just split your logic and API call.