I'm new to asyncio module, pls pardon me for my bad trial:
In my codes, I try to submit 100 tasks at first, then submit next 100 tasks after fore-100 tasks finished, then another next 100 tasks.
What should I do to make it work?
# len(ad_accounts) = 1000 for example
new_loop = asyncio.new_event_loop()
asyncio.set_event_loop(new_loop)
task_list = [
asyncio.ensure_future(_handle_account(account)) for ad_account in ad_accounts[:100]
]
#just submit 100 tasks here once
new_loop.run_until_complete(asyncio.wait(task_list))
# then can I continuely submit next 100 tasks?