Our codebase has a lot of threading restrictions encoded in comments - such as:
The first three can be seen on both classes and individual members.
I've searched for any solutions that could at least partially verify that these constraints are satisfied. I realise that there are major limitations on the extent to which this can be done automatically, but even a little help from a tool would really help. I couldn't find any though.
Can you suggest a tool to do something along these lines? Perhaps an FxCop ruleset that works by encoding the above restrictions as attributes?
I am not aware of any thread-safety specific attributes, simply because it is generally too complex. And "testing" threaded code (with addition of extra Debug.Assert
etc) is a common cause of heisenbugs. You could look at "CHESS"? It isn't a silver bullet, but it may be helpful.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With