create sockets in new thread, not in a greenlet