NET. We covered the various
mechanisms in place for managing synchronization between threads, including the Interlocked,
Monitor, AutoResetEvent, ManualResetEvent, and WaitHandle-based objects.We then described
the IOU pattern and how .NET uses it extensively to get work done asynchronously. That discussion
centered on the CLR??™s usage of the ThreadPool based upon the Windows thread pool
implementation.
Threading adds complexity to applications. However, when used properly, it can make
applications more responsive to user commands and more efficient. Although multithreading
development comes with its pitfalls, .NET and the CLR mitigate many of those risks and provide
a model that shields you from the intricacies of the operating system??”most of the time.
Not only does .NET provide a nice buffer between your code and the Windows thread pool
intricacies, but it also allows your code to run on other platforms that implement .NET. If you
understand the details of the threading facilities provided by the CLR, and with the synchronization
techniques covered in this chapter, then you??™re well on your way to producing
effective multithreaded applications.
In the next chapter, we??™ll go in search of VB canonical forms for types and investigate the
checklist of questions you should ask yourself when designing any type using VB.
Pages:
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513