Thread-Safety with the Interlocked Class

added by BlackWasp
3/1/2012 9:10:26 AM

1 Kicks, 213 Views

When developing multi-threaded software or using parallel programming techniques, it is essential that classes remain thread-safe. The Interlocked class provides methods that assist with thread safety by performing atomic operations.


1 comments

dpeterson
3/1/2012 9:11:42 AM
I really like the interlocked methods, generally when I need to get a lock for a cross-thread operation it's specifically to update a counter or some other nonsense.