Figured out I don't want to ever call yield directly, as it doesn't cause an os event. Use sleep(0) instead.