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
To test the basic usage of websockets, I want to start a server and test the return string from client, I think server and client should be in separate thread.
The below code passed, but I just want to know if there's a proper/generalized way to do it?
I'm not aware of a better solution. asyncio is limited to at most one event loop per thread. This is by design. If you need concurrent event loops, you need to resort to multiple processes or multiple threads like you did.
It's worth investigating if this functionality can be added to the new asyncio_event_loop mark (see #620).
However, there should also be a discussion if this should be added.
To test the basic usage of websockets, I want to start a server and test the return string from client, I think server and client should be in separate thread.
The below code passed, but I just want to know if there's a proper/generalized way to do it?
The text was updated successfully, but these errors were encountered: