Visual Basic .Net Threading Handbook

Visual Basic .Net Threading Handbook

Hardcover(2002)

$0.01

Item is available through our marketplace sellers.


Overview

Visual Basic .Net Threading Handbook by Apress, Sr Sivakumar, Kouresh Ardestani, Srinivasa Sivakumar

We are aware of a small coding error, the corrected code and support files can be found on the Wrox website. We offer full support for all our tiles.

Threads are fundamental to the way GUI and server applications operate - if your code is running in a GUI, then you're already writing code in a threaded environment. If your code runs in an ASP.NET page, then you're already running in a threaded environment. This book aims to cover the tricky issues of threading in .NET, and particularly to do so from the perspective of VB.NET developers. Threading is by nature not easy to grasp, but a necessary step towards mastery of the .NET platform.

Product Details

ISBN-13: 9781861007131
Publisher: Apress
Publication date: 06/24/2002
Edition description: 2002
Pages: 350
Product dimensions: 0.00(w) x 0.00(h) x 0.02(d)

Table of Contents

Introduction1
Book Outline2
What You Need to Know3
Chapter 1Defining Threads5
Threading Defined6
Multitasking6
Processes8
Threads9
Single-Threaded Processes9
Time Slices10
Multithreaded Processes10
How Interrupts and Thread Local Storage Work14
Thread Support in Visual Basic .NET20
System.AppDomain20
Setting AppDomain Data22
Executing Code within a Specified AppDomain24
Thread Management and the .NET Runtime26
Summary27
Chapter 2Threading in .NET29
System.Threading Namespace29
Thread Class31
Creating a Thread34
ThreadStart and Execution Branching36
Thread Properties and Methods38
Thread Priorities41
Timers and Callbacks43
Spinning Threads with Threads45
Spinning Threads with Threads with Threads48
Performance Considerations50
Life Cycle of Threads51
Putting a Thread to Sleep53
Interrupting a Thread55
Pausing and Resuming Threads56
Destroying Threads63
Joining Threads64
Why Not Thread Everything?65
Threading Opportunities66
Background Processes67
Accessing External Resources69
Threading Traps71
Execution Order Revisited71
Threads in a Loop73
Summary76
Chapter 3Working with Threads79
Why Worry About Synchronization?80
Synchronize Critical Sections81
Making the Account Object Immutable82
Using a Thread-Safe Wrapper82
.NET Synchronization Support83
.NET Synchronization Strategies84
Synchronized Contexts84
Synchronized Code Regions85
Monitors85
The ReaderWriterLock Class95
Manual Synchronization98
The ManualResetEvent Class99
The AutoResetEvent Class102
The Mutex Class103
The Interlocked Class104
Shared Variables and Methods and Synchronization105
Synchronization and Performance107
Beware of Deadlocks108
End-to-End Examples111
Writing Your Own Thread-Safe Wrappers111
A Database Connection Pool119
Implementing the Pool120
Summary127
Chapter 4Design Patterns129
Multiple Threads in Applications130
STA Threading Model130
MTA Threading Model132
Specifying the Threading Model133
Designing Threaded Applications133
Threads and Relationship135
Main and Worker Thread Model136
Peer Thread Model139
Pipeline Thread Model142
Summary144
Chapter 5Scaling Threaded Applications147
What is Thread Pooling?148
The Need for Thread Pooling148
The Concept of Thread Pooling148
The CLR and Threads149
The Role of the CLR in Thread Pooling150
Glitches Involved in Thread Pooling150
The Size of the Thread Pool151
Exploring the ThreadPool Class151
Programming the Thread Pool in VB.NET155
Scalability in .NET160
A Thread Pool Manager161
Summary174
Chapter 6Debugging and Tracing Threads177
Creating the Application Code178
Debugging Your Code179
Visual Studio .NET Debugger179
Configuring Debugger Parameters180
Debugger Tools181
The Locals Window181
The Watch Window181
The Command Window - Immediate Window182
Stepping Through the Code182
Setting Breakpoints183
Debugging Threads184
Code Tracing185
The System.Diagnostics.Trace Class186
Default Listener Application187
Using Different Listener Applications189
The TextWriterTraceListener Class192
Tracing Switches195
The BooleanSwitch Class196
The TraceSwitch class197
The Debug class199
The DataImport Example200
The Code201
Testing the Application205
Logical Errors206
Summary208
Chapter 7Networking and Threading211
Networking in .NET212
System.Net Namespace212
System.Net.Sockets Namespace214
Creating the Sample Application214
Design Goals215
Building the Application216
Creating the Client216
Creating the Server228
Running the Applications236
Summary238
AppendixSupport, Errata, and Code Download241
How to Download the Sample Code for the Book241
Errata241
E-Mail Support242
p2p.wrox.com243
Index247

Customer Reviews

Most Helpful Customer Reviews

See All Customer Reviews

Visual Basic .Net Threading Handbook 5 out of 5 based on 0 ratings. 1 reviews.
Guest More than 1 year ago
I really love this book. It provided me with the all I needed to get started with threading. I wish the book was updated with the latest threading technology though.