You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
392 B
24 lines
392 B
import gevent.monkey
|
|
gevent.monkey.patch_all()
|
|
|
|
import socket
|
|
import multiprocessing
|
|
|
|
# Make sure that using the resolver in a forked process
|
|
# doesn't hang forever.
|
|
|
|
|
|
def block():
|
|
socket.getaddrinfo('localhost', 8001)
|
|
|
|
|
|
def main():
|
|
socket.getaddrinfo('localhost', 8001)
|
|
|
|
p = multiprocessing.Process(target=block)
|
|
p.start()
|
|
p.join()
|
|
|
|
if __name__ == '__main__':
|
|
main()
|