Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
resolve_test_helper.py11 linesDownload Raw Back to test
1from tornado.ioloop import IOLoop
2from tornado.netutil import ThreadedResolver
3
4# When this module is imported, it runs getaddrinfo on a thread. Since
5# the hostname is unicode, getaddrinfo attempts to import encodings.idna
6# but blocks on the import lock. Verify that ThreadedResolver avoids
7# this deadlock.
8
9resolver = ThreadedResolver()
10IOLoop.current().run_sync(lambda: resolver.resolve("localhost", 80))
11 
codekingpro/portable-devtools · Team Ai