@@ -0,0 +1,18 @@
+import asyncio
+from util import async_timed
+
+@async_timed()
+async def cpu_bound_work() -> int:
+ counter = 0
+ for i in range(10000000):
+ counter += 1
+ return counter
+async def main() -> None:
+ task_one = asyncio.create_task(cpu_bound_work())
+ await task_one
+asyncio.run(main(), debug=True)
@@ -0,0 +1,5 @@
+import socket
+def foo():
+ server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+ server_socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)