Summary

This chapter provided an extensive tour of threads in the .NET platform. You learned how to create and manage threads using the Thread class in the System.Threading namespace. You also learned how to synchronize threads using the various objects available in the .NET Framework Class Library—in particular, the Monitor class, the Interlocked class, and the ReaderWriterLock class. The chapter also explained how to notify threads about significant events using the ManualResetEvent and AutoResetEvent classes and how to use the Mutex class to achieve lightweight exclusive locking between threads and across processes. Finally, you learned to use the .NET thread pooling mechanisms when performing background tasks with threads.

Get Microsoft® Visual J#™ .NET (Core Reference) now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.