We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 03ab1e7 commit a1f9547Copy full SHA for a1f9547
apps/py/ch10_async/ascrape.py
@@ -27,6 +27,8 @@ async def get_html(n: int) -> str:
27
return resp.text
28
29
30
+# @unsync # <-- will run get_title_from_html() on a background thread.
31
+# @unsync(cpu_bound=True) # <-- will run get_title_from_html() on a subprocess.
32
def get_title_from_html(n: int, html: str) -> str:
33
print(Fore.CYAN + f"Getting TITLE for episode {n}...", flush=True)
34
0 commit comments