specifically, is the "+=" operation atomic? does it make a difference if i'm using the 'event' keyword, or just a plain old delegate?
with most types, its a read, then the "+" operator, and then a write. so, it's not atomic. i'd like to know if there's a special case for delegates/events.
is this kind of code necessary, or redundant:
Action handler;
object lockObj;
public event Action Handler {
add { lock(lockObj) { handler += value; } }
remove { lock(lockObj) { handler -= value; } }
}