Simple scheduler for Protothreads