Hi Brian,
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:
#!/bin/env python
import htcondor
import classad
import threading
def spawn():
schedd = htcondor.Schedd()
print "%r" % schedd
schedd.submit(classad.ClassAd({"Cmd": "/bin/echo"}))
for i in range(2):
t = threading.Thread(target=spawn)
t.start()