Implement a Python WebSocket listener without async/asyncio

Viewed 1780

I'm running a websocket listener in a separate thread. I'd like to connect to the websocket then do:

while True:
    msg = sock.wait_for_message()
    f(msg)

i.e. no async/asyncio

Is this stupid? Is there a way to do this?

1 Answers
Related