Thanks for your reply. I have written a simple test script to submit job classads from two threads created by threading module.
The submit in one of the threads will fail with the error message: RuntimeError: Failed to connect to schedd. The RuntimeError won't show up if i use a lock to make the submit a synchronous operation.
I will appreciate it if you can take a look at it. Thanks
The code is as follows:
schedd = htcondor.Schedd()
print "%r" % schedd
for i in range(2):
t = threading.Thread(target=spawn)