T
Thomas G. Marshall
Kenneth P. Turvey coughed up:
/Often true/, but *not at all true* if you intend this as a strict rule. A
"self contained method", even if very tight, might very well (and often they
do) sensibly contain a few operations in it, some but not all of which need
to be atomic together.
Besides, regardless of quality arguments, the point is that it so often does
matter what precisely gets locked within a method, and if not now, then down
the road. And especially to MT newbies, who whether they believe themselves
to be or not, end up mutexing up the universe in an attempt to get things to
work.
If you are writing small self contained methods that only do one
thing, this shouldn't matter.
/Often true/, but *not at all true* if you intend this as a strict rule. A
"self contained method", even if very tight, might very well (and often they
do) sensibly contain a few operations in it, some but not all of which need
to be atomic together.
Besides, regardless of quality arguments, the point is that it so often does
matter what precisely gets locked within a method, and if not now, then down
the road. And especially to MT newbies, who whether they believe themselves
to be or not, end up mutexing up the universe in an attempt to get things to
work.