You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One call is for a 2 seconds wait and the other is for a 1 second wait. However, since they are called in parallel I expected the overall wait to be around 2 seconds but the log shows 3 seconds:
INFO:__main__:method result is: [None, None] dt: 3.005395
Looking at the server side, it looks like it serializes the calls:
1687280357.4277189 Sleeping asynchronously for 2 seconds
1687280359.433525 Sleeping asynchronously for 1 seconds
Since multiply_async has an async sleep, why aren't the calls processed in parallel?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I modified the
server-methods.py
example to print a timestamp whenevermultiple_async
is called:on the client side, I called made two calls in parallel:
One call is for a 2 seconds wait and the other is for a 1 second wait. However, since they are called in parallel I expected the overall wait to be around 2 seconds but the log shows 3 seconds:
Looking at the server side, it looks like it serializes the calls:
Since
multiply_async
has an async sleep, why aren't the calls processed in parallel?Beta Was this translation helpful? Give feedback.
All reactions