Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

Hi,

I am working on a multi-threading project. I wonder if it is possible to suspend the thread in the callback context.

For example:
In processing EVT_KEY_PRESS
case EVT_KEY_PRESS:
{
ITHREAD_Suspend( pIThread );

The problem is how to get pIThread?? :confused:

You cannot suspend the "primeval" thread, which is what you are in in the callback context. What you can do is return TRUE (indicating you have handled the keypress) and then just manage your own key event queue, processed by a different thread.

You cannot suspend the "primeval" thread, which is what you are in in the callback context. What you can do is return TRUE (indicating you have handled the keypress) and then just manage your own key event queue, processed by a different thread.