Skip to content

Instantly share code, notes, and snippets.

@Zhuwenhui
Zhuwenhui / async_sample.py
Created September 12, 2019 18:39 — forked from rhoboro/async_sample.py
asyncio, aiohttpを利用した並列処理のサンプルコード
import asyncio
import aiohttp
import async_timeout
from aiohttp import ClientError
async def _fetch(session, url, coro):
"""HTTPリソースからデータを取得しコルーチンを呼び出す