-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
I'll kill two birds with this stone :-)
Due to the terms of the license Palm has from Kadak Systems for
the AMX kernel we are not permitted to release any documentation or
provide any support for third parties using the multi-tasking aspects
of the AMX kernel unless the third party has a separate license with
Kadak. I won't get into why that is the case here. I should also note
that the kernel resources used for background tasks are extremely
limited.
Ben's note regarding using nil events is a good technique, others
include patching EvtGetEvent or SysHandleEvent. The upshot being that
you need to roll your own solution. In the specific case of TCP/IP,
you can use the select call (aka NetLibSelect) to inform you whenever
sockets are ready or when there are events pending on the event
queue. There are some gotchas and a couple of bugs to work around,
but structuring your event loop around NetLibSelect rather than
EvtGetEvent will allow you to forgo having to poll sockets for
incoming data.
Cheers,
Bruce Thompson
Partner Engineering,
Palm, Inc.
>I'll give you a middle-length answer: you can't do it.
>
>Depending on what you're trying to do, it may be worth trapping nil events
>and writing your own background threading. I've had to do this on a couple
>TCP/IP programs that need to poll sockets while still accepting user data.
>Not much fun, but you do what you have to do, I guess.
>
>Regards,
>Ben Flaumenhaft
>
>>> From: Ghazi Ramadan [mailto:[EMAIL PROTECTED]]
>>> Does any one know how to create a background task on the
>>> PalmOS. I tried SysTaskCreate() but I couldn't figure it out since no
>>> documentation is available for system API's
>>
>>(Oh, I'll handle it this time...)
>>
>>Short answer: you can't do that.
>>
>>Long answer: http://oasis.palm.com/dev/kb/article.cfm?id=1053
>>
>>-slj-
>>
>>
>>--
>>For information on using the Palm Developer Forums, or to unsubscribe,
>>please see http://www.palm.com/devzone/mailinglists.html
>
>
>--
>For information on using the Palm Developer Forums, or to unsubscribe, please
>see http://www.palm.com/devzone/mailinglists.html
- --
- ------------------------------------------------------------------------------
Bruce Thompson | "Pinkie! Are you pondering what I'm pondering?"
Software Engineer | "I think so Brain, but if they called them Sad
Partner Engineering | Meals kids wouldn't buy them!"
Palm, Inc.
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.2 for non-commercial use <http://www.pgp.com>
iQA/AwUBOQjICFg7m8VHhEumEQJ9nACgz9B1XQZNme08N67YM/KqkbrAYokAoJCr
XmOuH4Pin+TO2dn4hv5XOAzq
=g6PY
-----END PGP SIGNATURE-----
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html