Conclusion

I l @ ve RuBoard

The ability to create multiple threads in an application is an incredibly powerful tool, but it can add a degree of complexity that makes debugging difficult because of transient conditions. The best way to avoid problems is to sit down and work out how your threads will be used within the application. Identify all of the shared resources and be sure to implement appropriate synchronization mechanisms. Also, design your thread implementation to limit its use to your intended purpose. This offers two benefits. First, your thread will not be used in an unintended way (or will be more difficult to use in an unintended way). Second, if you need to alter the behavior of a thread, this will usually necessitate a design change, which will give the original developer an opportunity to evaluate any potential issues and resolve them.

In this chapter, you learned how to implement threads, communicate between them, share resources, and manage large numbers of threads. Hopefully, you also gained a better appreciation for how threads can and should be used within your applications.

I l @ ve RuBoard


Designing Enterprise Applications with Microsoft Visual Basic .NET
Designing Enterprise Applications with Microsoft Visual Basic .NET (Pro-Developer)
ISBN: 073561721X
EAN: 2147483647
Year: 2002
Pages: 103

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net