Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/pt/ptmainloop.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/pt/ptmainloop.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/pt/ptmainloop.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/pt/ptmainloop.html on line 8

PtMainLoop()

Implement an application main loop

Synopsis:

void PtMainLoop( void );

Library:

ph

Description:

This is a convenience function that implements an application main loop using PhEventNext() and PtEventHandler(). PtMainLoop() also supports background processing (WorkProcs), signals, threads, and the handling of non-Photon messages (inputs).

PtMainLoop() allocates an event buffer and resizes it as necessary. You can set the size yourself by calling PtResizeEventMsg().

To terminate normally, your applications should call PtExit() within a callback function. To terminate a thread that's running PtMainLoop() without terminating the entire application, call PtQuitMainLoop().

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PhEventNext(), PtAppAddInput(), PtAppAddWorkProc(), PtEventHandler(), PtExit(), PtQuitMainLoop(), PtResizeEventMsg()

Receiving QNX messages in the Interprocess Communications chapter of the Photon Programmer's Guide


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/pt/ptmainloop.html on line 110

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/pt/ptmainloop.html on line 110