DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Multitasking In Series60 Phone

  • submit to reddit
import e32
from SomeBigLibrary import *

# your codes follow
Series60 phones use cooperative multitasking.
You call e32.ao_yield() here and there to let other tasks run before they return back to you.

e32.ao_lock() also plays a role when you wait for callback.