Dear support
I have used daemon.pl which has been introduced in chapter *Translating web
pages with Moses to* set a Moses server. And of course it could work and
translates string normally. However when I use multi-thread to send
requests to the server at the same time some threads may catch the error:
[Errno 10060] A connection attempt failed because the connected party did
not properly respond after a period of time, or established connection
failed because connected host has failed to respond. My test code are as
follows:
#python
import threading
import socket
class ThreadClass(threading.Thread):
def run(self):
clisock=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
server='127.0.0.1'
clisock.connect((server,8089))
clisock.send("could not connect it\n")
print self.getName()+clisock.recv(1000)
clisock.close()
for i in range(20):
t=ThreadClass()
t.start()
Does the Moses translation engine supports multi-thread? Or there're some
restrictions about the number of the thread? Or I have to modify some code
in daemon.pl?
Best regards
Sephiroth
_______________________________________________
Moses-support mailing list
[email protected]
http://mailman.mit.edu/mailman/listinfo/moses-support