What kind of deadlock prevention do you want?
Okay, so I'm having another look at the alternative threading ideas
which are part of my threading article. (They're not that big an
alternative really - not compared with CSP etc - they'd just make
things more pleasant.) I want to add deadlock prevention to my locks,
making it impossible to lock things incorrectly (so long as you're
locking the simple way - if you lock the associated monitor
independently, that's your own lookout). Obviously this requires you to
set up what's correct and what's incorrect to start with. My question
to you all is: how do you want to be able to set up those
rules? What kind of rules do you need? Do they need to be extensible
somehow? Some desirable things may be impossible, but I'd like to know
what the ideal would look like before working out the realistic. I have
a couple of pretty simple ideas, but I won't taint your own views by
mentioning them yet...