@ljanyst @jlsalmon - what are your thoughts on a PR which removes the asynchronous capabilities from the python client?

I haven't found any way to actually use these safely. Take the async example shipped with the code:

def callback( status, response, hostlist ):
  print "Called:", status, response, hostlist

with client.File() as f:
  status, response = f.open('root://localhost//tmp/eggs', OpenFlags.DELETE)
  status = f.fcntl( 'asdf', callback = callback )
  sleep(20)

This will deadlock if fcntl takes exactly 20 seconds:
1. The main python thread will hold the GIL and close the XrdFile object, which takes an XrdCl mutex.
2. The Xrootd asynchronous callback pool will take a XrdCl mutex and grab the GIL.

Hence, even this trivial example can lead to a deadlock! (Of course, as I mentioned, any usage of the asynchronous callbacks can lead to a deadlock, so this is maybe not so surprising)


Reply to this email directly or view it on GitHub.



Use REPLY-ALL to reply to list

To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1