Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Archived:Python Threading recommendations

From Wiki
Jump to: navigation, search

Archived.pngAquivado: Este artigo foi arquivado, pois o conteúdo não é mais considerado relevante para se criar soluções comerciais atuais. Se você achar que este artigo ainda é importante, inclua o template {{ForArchiveReview|escreva a sua justificativa}}.

All PySymbian articles have been archived. PySymbian is no longer maintained by Nokia and is not guaranteed to work on more recent Symbian devices. It is not possible to submit apps to Nokia Store.

Article Metadata
Tested with
Devices(s): Nokia E63
Platform(s): S60 3rd Edition
Keywords: threading,appuifw,thread,pys60
Created: User:Jdelalan (04 Apr 2010)
Last edited: hamishwillee (08 May 2013)



Given to the special handling of concurrent programming & UI in Symbian (active objects), you can't really develop a multi-threaded application as you would do it with a PC and a graphical toolkit.

1. You can use threads

Standard threading module is included in pys60, you can spawn threads « normally »

2. Only main thread uses appuifw

It's to say if you create threads using threading module, they can't do any drawing/ui operations.

Be aware of that, if you try to use appuifw function in a 3d-party thread, your script will crash (without displaying explicit error as far as I know).

3. use Ao_lock in main thread...

... Otherwise, each time you do a blocking acquire on a Lock/Semaphore/Event... from threading module, your UI will become unresponsive. For the same reason, use Ao_timer and ao_sleep for using delays (see API doc).

4. Main thread is the last to live

You should terminate all other threads before sending the end signal to the main thread.

This page was last modified on 8 May 2013, at 06:31.
16 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.