Using Ithread | developer.brewmp.com Using Ithread | developer.brewmp.com

Developer

Using Ithread

Forums:

Hello friends,
I have been charged to investigate about the communication between thread and task.
My question is,

Is it possible to establish communication between a thread and task ? If so, how it can be done, i.e, by message queues / pipes?

Secondly, Is it possibble to set the priority for threads? If not, how can i prioritize a task and a thread?

Thank you,

Regards,
arasan.

BREW's IThread inteface doesn't work like an operating system thread. BREW is still in essence a single-threaded environment. IThread simply gives you some different ways of controlling the flow of your application code.
There are no priorities associated with BREW IThreads for the simple reason that there is no preemption. Threads must yield, at which point some other piece of your code takes over and decides what to do next.

BREW's IThread inteface doesn't work like an operating system thread. BREW is still in essence a single-threaded environment. IThread simply gives you some different ways of controlling the flow of your application code.
There are no priorities associated with BREW IThreads for the simple reason that there is no preemption. Threads must yield, at which point some other piece of your code takes over and decides what to do next.

:o Hello Nathan,
Thank you very much. One more doubt, can i post an event from a task to the thread which is RUNNING so that i can stop the thread, complete the task and continue the thread ?
Please let me know how to stop the thread, complet the task, and continue thread operation
Thank you,
Regards,
Tamil.

:o Hello Nathan,
Thank you very much. One more doubt, can i post an event from a task to the thread which is RUNNING so that i can stop the thread, complete the task and continue the thread ?
Please let me know how to stop the thread, complet the task, and continue thread operation
Thank you,
Regards,
Tamil.

arasan81 wrote::o Hello Nathan,
Thank you very much. One more doubt, can i post an event from a task to the thread which is RUNNING so that i can stop the thread, complete the task and continue the thread ?
Please let me know how to stop the thread, complet the task, and continue thread operation
Thank you,
Regards,
Tamil.
If the thread is running, then the task isn't, so this question doesn't make sense in a cooperative environment like BREW.
A thread can stop itself by calling code like:
cbk = ITHREAD_GetResumeCBK
ITHREAD_Suspend
and then anyone can resume it later with
ISHELL_Resume(pIShell, cbk)

arasan81 wrote::o Hello Nathan,
Thank you very much. One more doubt, can i post an event from a task to the thread which is RUNNING so that i can stop the thread, complete the task and continue the thread ?
Please let me know how to stop the thread, complet the task, and continue thread operation
Thank you,
Regards,
Tamil.
If the thread is running, then the task isn't, so this question doesn't make sense in a cooperative environment like BREW.
A thread can stop itself by calling code like:
cbk = ITHREAD_GetResumeCBK
ITHREAD_Suspend
and then anyone can resume it later with
ISHELL_Resume(pIShell, cbk)