Spawn tasks with gevent and add waiting mechanism