EventDrivenThread: sending/receiving events problem
EventDrivenThread: sending/receiving events problem
BY 25 Sep 2013Native Application Development
Hi There,
I want to run a long processing job in a thread. During this, I show the progress of this job on the GUI Form. Every time the thread finishes 1% of the job, it sends an event to the Form, which steps a progressbar in the OnUserEventReceivedN.
I found the following problem / bug:
If you create an EventDrivenThread, and inside it’s OnUserEventReceivedN() you are sending event to the main thread, those events are not delegated to the main thread until you touch the screen(!), or wait quite some time, then they are delivered in one goal, then again nothing, then again many. My experiences are based on the emulator.
EventDrivenThread: sending/receiving events problem
Hi There,
I want to run a long processing job in a thread. During this, I show the progress of this job on the GUI Form. Every time the thread finishes 1% of the job, it sends an event to the Form, which steps a progressbar in the OnUserEventReceivedN.
I found the following problem / bug:
If you create an EventDrivenThread, and inside it’s OnUserEventReceivedN() you are sending event to the main thread, those events are not delegated to the main thread until you touch the screen(!), or wait quite some time, then they are delivered in one goal, then again nothing, then again many.
My experiences are based on the emulator.
Thread:
MainForm:
Output:
While it should be:
If I start touching the screen, I got the correct order/callback.
Sample App: https://docs.google.com/file/d/0B6SsFyPBmm_CODloWGJ4YmI5MkE
*********** UPDATE ************
I tried with worker threads too, and the same problem:
Output
And also, if I “touching” the screen randomly, the events are dispatched normally. Probably a screen thouch forces events to be processed?
*********** UPDATE 2 ************
I found a “workaround”: if I send an event to the Application too in the thread, then it works fine. Strange. I think this is a bug.
Output
BY
16 Apr 2025
Tizen Studio
BY
04 Nov 2024
Tizen Studio
BY
02 Apr 2024
Tizen Studio