C++ Multithreading Cookbook [DrLol].pdf

时间:2018-04-02 13:17:54
【文件属性】:

文件名称:C++ Multithreading Cookbook [DrLol].pdf

文件大小:3.14MB

文件格式:PDF

更新时间:2018-04-02 13:17:54

Multithread C++

Chapter 1: Introduction to C++ Concepts and Features 7 Introduction 7 Creating a C++ project 8 Program structure, execution flow, and runtime objects 10 The structural programming approach 14 Understanding the object-oriented programming approach 17 Explaining inheritance, overloading, and overriding 19 Understanding polymorphism 24 Event handlers and Message Passing Interface 28 Linked list, queue, and stack examples 34 Chapter 2: The Concepts of Process and Thread 45 Introduction 45 Processes and threads 46 Explaining the process model 47 Implementation of processes 51 IPC – Interprocess Communication 55 Solving classical IPC problems 65 Implementation of the thread model 75 Thread usage 81 Implementing threads in user space 89 Implementing threads in the kernel 99 Chapter 3: Managing Threads 105 Introduction 105 Processes versus threads 106 Permissive versus preemptive multitasking 110 Explaining the Windows Thread object 111 Basic thread management 112 Implementing threads without synchronization 121 Using synchronized threads 127 Win32 synchronization objects and techniques 133 Chapter 4: Message Passing 141 Introduction 141 Explaining the Message Passing Interface 142 Understanding a message queue 147 Using the thread message queue 156 Communicating through the pipe object 161 Chapter 5: Thread Synchronization and Concurrent Operations 167 Introduction 167 Pseudoparallelism 168 Understanding process and thread priority 168 The Windows dispatcher object and scheduling 176 Using mutex 177 Using semaphore 187 Using event 197 Using critical section 206 Using pipes 215 Chapter 6: Threads in the .NET Framework 233 Introduction 233 Managed versus unmanaged code 234 How threading works in .NET 235 The difference between foreground and background threads 243 Understanding the .NET synchronization essentials 247 Locking and avoiding deadlocks 254 Thread safety and types of the .NET framework 261 Signaling with event wait handles 263 Event-based Asynchronous Pattern 269 Using the BackgroundWorker class 276 Interrupting, aborting, and safe canceling the thread execution 281 Non-blocking synchronization 291 Signaling with Wait and Pulse 294 The Barrier class 299 Chapter 7: Understanding Concurrent Code Design 309 Introduction 309 How to design parallel applications 310 Understanding parallelism in code design 316 Turning on to a parallel approach 324 Improving the performance factors 332 Chapter 8: Advanced Thread Management 341 Introduction 341 Using thread pools 342 Customizing the thread pool dispatcher 354 Using remote threading 371 Appendix 381 Installing MySQL Connector/C 381 Installing WinDDK – Driver Development Kit 384 Setting up a Visual Studio project for driver compilation 386 Using the DebugView application 392 Setting up a Visual Studio project for OpenMP compilation 393 Index 397


网友评论