收集执行绪执行资料核取方块。
同步处理多执行绪处理的资料。
TextWriter instance that is returned. For more information about synchronization and threading, see.
从执行绪共用执行绪传回值并不简单。
Returning values from a thread-pool thread is not straightforward.
处理序的所有执行绪共用处理序的每个资源。
Each resource of a process is Shared by all that process's threads.
具有一个以上执行绪的处理序就称为多执行绪。
Processes that have more than one thread are called multithreaded.
如果您需要执行与使用者介面互动的背景执行绪,。
If you need to run background threads that interact with the user interface, the.
在一个执行绪中所作的变更不会反映在另一个执行绪中。
Changes made in one thread would not be reflected in the other.
在执行绪之间共用资源是多执行绪程序设计常见的需求。
Sharing resources between threads is a frequent necessity in multithreaded programming.
根据一般规则,执行绪只能存取它所建立的MF c物件。
As a general rule, a thread can access only MFC objects that it created.
下列主题将简介多执行绪程式设计的一些考量和最佳应用。
The following topics introduce you to some of the considerations and best practices for multithreaded programming.
一般多执行绪应用程序拥有代表执行绪之间共用资源的类别。
A typical multithreaded application has a class that represents a resource to be Shared among threads.
第三个执行绪可以根据滑鼠和键盘执行绪的资料更新萤幕显示。
A third thread can update the display screen based on data from the mouse and keyboard threads.
一个执行绪可以处理键盘输入,而第二个执行绪筛选滑鼠动作。
One thread can process keyboard input while a second thread filters mouse activities.
程序会在系统排程器将执行控制提供给程序的其中一个执行绪时执行。
A program executes when the system scheduler gives execution control to one of the program's threads.
为了让您的多执行绪元件成为安全执行绪,您必须协调共用资源的存取。
In order for your multithreaded components to be thread-safe, you must coordinate access to Shared resources.
跨执行绪相依性表示评估程式码需要暂时执行应用程式中的其他执行绪。
A cross-thread dependency means that evaluating the code requires other threads in your application to run temporarily.
背景工作执行绪通常是用来完成不需要使用者输入的工作,例如重新计算。
Worker threads are commonly used to complete tasks, such as recalculation, that do not require user input.
例如,一个执行绪更新结构的内容时,另一个执行绪读取相同结构的内容。
For example, one thread could be updating the contents of a structure while another thread is reading the contents of the same structure.
例如,高优先权执行绪处理时间紧急的工作,而低优先权执行绪执行其他工作。
For example, a high-priority thread manages time-critical tasks, and a low-priority thread performs other tasks.
当您启动记事本时,作业系统会建立处理序并且开始执行该处理序的主执行绪。
When you start Notepad, the operating system creates a process and begins executing the primary thread of that process.
所以某些形式的互斥是必要的,才能确保同时间只有一个执行绪在存取该资源。
Some form of mutual exclusion is necessary to make sure that only one thread is accessing the resource at a time.
处理序由一或多个执行绪和程序码、资料以及程序在记忆体中的其他资源所组成。
A process consists of one or more threads and the code, data, and other resources of a program in memory.
多执行绪:程序设计提示说明您可用来处理在这些情况中可能发生的问题的技术。
Multithreading: Programming Tips describes techniques that you can use to get around problems that might arise in these situations.
MFC提供许多类别,这些类别允许执行绪同步物件的存取,以维护执行绪安全性。
MFC provides a number of classes that allow threads to synchronize access to objects to maintain thread safety.
在单一执行绪应用程式中,使用者可能需要花费閒置时间等待计算或资料库更新完成。
In a single-threaded application, a user may spend idle time waiting for the calculations or database updates to finish.
由于每段时间极短,因此即使只有一个处理器,多个执行绪看起来还是像同时执行一样。
Because each time slice is small, multiple threads appear to be executing at the same time, even if there is only one processor.
在多执行绪:如何使用同步类别和多执行绪:何时使用同步类别中说明了这些类别的用法。
Usage of these classes is described in Multithreading: How to Use the Synchronization classes and Multithreading: When to Use the Synchronization classes.
在多执行绪:如何使用同步类别和多执行绪:何时使用同步类别中说明了这些类别的用法。
Usage of these classes is described in Multithreading: How to Use the Synchronization classes and Multithreading: When to Use the Synchronization classes.
应用推荐