From 3dfcbabb8b225c777e53aacfcecd65c229c8f7e1 Mon Sep 17 00:00:00 2001 From: evelynmitchell Date: Wed, 27 Nov 2024 20:02:16 -0700 Subject: [PATCH] whitespace --- example_async_vs_multithread.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/example_async_vs_multithread.py b/example_async_vs_multithread.py index f547abc8..f550314d 100644 --- a/example_async_vs_multithread.py +++ b/example_async_vs_multithread.py @@ -52,6 +52,7 @@ def measure_time_and_memory(func): return result return wrapper + # Function to run the agent asynchronously @measure_time_and_memory async def run_agent_async(): @@ -61,11 +62,15 @@ async def run_agent_async(): ) ) + # Function to run the agent on another thread @measure_time_and_memory def run_agent_thread(): asyncio.run(run_agent_async()) + # Run the agent asynchronously and on another thread to test the speed asyncio.run(run_agent_async()) run_agent_thread() + +