Comment 2 for bug 1286285

Revision history for this message
John Griffith (john-griffith) wrote :

So I finally (with the help of some test code and talking through it with eharney and guitarzan) understand the misconception here and why some drivers (like the 3par driver) have issues here.

For the general case time.sleep only blocks the calling thread, NOT the entire process. So I couldn't figure out why everyone was so up in arms about time.sleep being in the code. So I tested it, convinced myself that I was correct etc. But then it was pointed out some drivers were failing/blocking all access when using time.sleep. It turns out "yeah" because a lot of those drivers put global sync-locks all over in their code. So now you're hosed.

Anyway, what you have here will work around your lock I believe. I'm still not certain this is the best way to do this. Eharney for example is working on his own lock decorator that actually uses the volume-id which seems to me like a MUCH better approach.

All of that being said, I don't see any harm in this so if it's how you want to address it fine by me.