I have actually done this already(move from Windows CE with multiple
threads, to the Palm OS). How I did it was: capture the nilEvent and have
it run the code to check to see if anything has arrived at the recv port.
It seems to emulate a multithread very well. Basically just put everything
you want for the 2nd thread in the nilEvent.

Lance Gregory
[EMAIL PROTECTED]

At 11:23 AM 3/26/02 -0500, you wrote:
>If you want to port to the palm, and your app is in C/C++, then the answer 
>is "not easily".  The best thing you could do is to do a NetLibSelect() on 
>your socket with a very sort wait time (say 0) and have the event loop wait 
>for a short time as well.  If you get a timeout from the select then you 
>read the data from the socket and do what you have to do.
>
>For Java it's a different story - most of the VM's for the Palm support 
>some form of multithreading (they have to given Java's communications 
>framework, although it's supposed to be fixed in the 1.4 spec).  There is 
>the overhead of the VM, however, and you really can't run that many threads 
>on the device.
>
>I've written several apps for the Palm that do the NetLibSelect(), it works 
>very well. The key is to make sure your processing of the data doesn't take 
>a long time (or long enough that users are bothered by the hesitation).  In 
>all honesty, there are very few apps for any handheld platform that should 
>be doing long processing on incoming data which also require near-constant 
>user interaction (I said few, not none).  Multithreading can help alleviate 
>some of these problems, but it's not a panacea (it's not too hard to bog 
>down a processor with some bad code, be it a Dragonball or a Pentium IV at 
>2+ GHz...).
>
>At 12:00 AM 3/26/2002 -0800, "Vivek Desai" <[EMAIL PROTECTED]> wrote:
>>I am supposed to port my Windows CE application to PalmOS. My WinCE
>>application uses Windows Sockets wherein a thread is dedicated to recv()
>>incoming messages. Palm is a single threaded platform. So is there any
>>workaround to emulate a Multithreaded environment in Palm, or atleast a dual
>>threaded environment.
>>
>>I know there will be developers who feel this is something that defies the
>>very basics of Palm computing but I am afraid its difficult to convince my
>>Project Managers.
>>
>>comments/suggestions welcome.
>>
>>regards,
>>Vivek
>
>----
>Tom Frauenhofer, [EMAIL PROTECTED]
>http://www.beret.com
>"Playing harp takes lots of luck, a love of music, and a pick-up truck." - 
>Valentine Frauenhofer
>
>
>-- 
>For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/
>
>

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to