From https://blog.miguelgrinberg.com/post/mi ... -the-cloud
My question is how do I find out which functions are asynchronous? What about:A Wi-Fi connection can take a few seconds to be completed, and this happens asynchronously. To avoid returning from this function before the connection is fully established, I've added a while-loop that blocks the function until the isconnected() function returns True. Inside the loop I just call time.sleep(1) to wait for one second before checking the connection again. Using a while-loop with a sleep inside is a standard way to block until a condition is satisfied.
- ntptime.time()
- ntptime.settime()
- addr = usocket.getaddrinfo(host, port)[0][-1]
- sock.connect(addr)
Thanks in advance.