The network library does run in its own task, but you need to periodically call EvtGetEvent/SysHandleEvent for the network lib to get it's CPU time.
Typically you do this by breaking up your work in 3 so that you can do a little work, check for events in a loop. Sleeping will only make it worse. Check out NetLibSelect. Hope this helps. Kevin -----Original Message----- From: Ioi Lam [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 3:51 PM To: Palm Developer Forum Subject: Socket and CPU intensive application I have an app (written in C) that: [1] opens a socket [2] reads a portion of the contents [3] makes some CPU intensive calls [4] then read the socket again However, on mochaPPP, at some point during [3], the underlying TCP/IP transmission starts failing. The mochapPP log indicates that the server tries to retransmit the data (probably the Palm never got a chance to send back an ACK because I have taken over the CPU). I think the PalmOS is not multi-threaded. If I spin the CPU, the OS won't have a chance to service incoming TCP/IP packets. Is my understanding correct? I tried putting some random sleeps inside [3] but that doesn't seem to help. Any suggestions? Thanks! - Ioi -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
