Created
January 2, 2019 22:48
-
-
Save amyreese/d554e4e7b6f3c8a6030c2ad1a16f941e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
from aiohttp import request | |
from aiomultiprocess import Worker | |
async def get(url): | |
async with request("GET", url) as response: | |
return await response.text("utf-8") | |
async def main(): | |
p = Worker(target=get, args=("https://jreese.sh", )) | |
response = await p | |
# asyncio.run(main()) | |
loop = asyncio.get_event_loop() | |
loop.run_until_complete(main()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment