#
#   Basic IO scheduler test -- cofunction version
#

from sys import stdin
from scheduler import *

codef loop():
  while 1:
    print("Waiting for input")
    block_for_reading(stdin)
    print("Input is ready")
    line = stdin.readline()
    print("Input was:", repr(line))
    if not line:
      break

coschedule(loop)
run2()
