语言

Menu
Sites
Language
using api like waitforsinglepobject in tizen

hello, 

 

I am writing  a source code for executing repetitive funtionality.

To do this, i need a something like a "waitforsingleobject api".

 

is there any sample to implement "waitforsingleobject api" in tizen???

 

Using Timer is not fit for writing source code, the reason is that 

when wifimanager should wait the callback from listner. it mean my application should be waiting until event came from listener. 

In this case, Main Thread cannot wait ,hold and sleep itself's procedure by threadsleep or timer, until the callback event from listener.

- threadsleep freeze my application, can't receive event from listener.

- using timer is just calling timer.start,   right after call timer.start mainthread goes end. 

 

my goal is writing source code like this, but using timer or threadsleep it's impossible

function()

{

   step1 procedure.

   sleep(time) - during sleep my app. should receiver a event from platform like a wifi connected, Rssi changed,.

   step2 procedure

   sleep(time)  - maybe waitingforsingleobject able to be here/?

   step3 procedure

   sleep(time)

  ......

}

 

if i need a lot of sequence like that wating listeners response.

if i follow guide line of Tizen samples, i should implement every source code in the "OnTimerExpired". also it has a limitation to implement

i should use if~else or index counting to distinguish a test progress, sequences.. step1, step2,,,,

 

is ther any body to help this problem?

编辑者为: Brock Boland 17 3月, 2014 原因: Paragraph tags added automatically from tizen_format_fix module.

响应

1 回复
youngsik yoon
how about using thread->join()