How to send signals to PtMainLoop() thead

Hi, I am new to QNX GUI Programming, I want to send a signal or non-Photon messages (inputs), to the thread which has PtMainLoop().

In fact I want to close the PtMainLoop() from other thread.

I have two threads in my programm, one is GUI thread, and other is background thread. GUI thread has PtMainLoop(), as soon as background thread completes its work, it has to inform GUI thread, and GUI thead quits.

Thanks in Advance.

PtAppAddSignalProc(). There is also a nice section in the documentation ( yeap the documentation) about background thread.