You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/c-language/thread-local-storage.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ ms.workload: ["cplusplus"]
14
14
# Thread Local Storage
15
15
**Microsoft Specific**
16
16
17
-
Thread Local Storage (TLS) is the mechanism by which each thread in a given multithreaded process allocates storage for thread-specific data. In standard multithreaded programs, data is shared among all threads of a given process, whereas thread local storage is the mechanism for allocating per-thread data. For a complete discussion of threads, see [Processes and Threads](http://msdn.microsoft.com/library/windows/desktop/ms684841) in the Windows SDK.
17
+
Thread Local Storage (TLS) is the mechanism by which each thread in a given multithreaded process allocates storage for thread-specific data. In standard multithreaded programs, data is shared among all threads of a given process, whereas thread local storage is the mechanism for allocating per-thread data. For a complete discussion of threads, see [Processes and Threads](/windows/desktop/ProcThread/processes-and-threads) in the Windows SDK.
18
18
19
19
The Microsoft C language includes the extended storage-class attribute, thread, which is used with the __declspec keyword to declare a thread local variable. For example, the following code declares an integer thread local variable and initializes it with a value:
Copy file name to clipboardExpand all lines: docs/mfc/tn064-apartment-model-threading-in-activex-controls.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ ms.workload: ["cplusplus"]
23
23
24
24
However, different instances of the same type of control may be assigned to different apartments. So, if multiple instances of a control share any data in common (for example, static or global data), then access to this shared data will need to be protected by a synchronization object, such as a critical section.
25
25
26
-
For complete details on the apartment threading model, please see [Processes and Threads](http://msdn.microsoft.com/library/windows/desktop/ms684841) in the *OLE Programmer's Reference*.
26
+
For complete details on the apartment threading model, please see [Processes and Threads](/windows/desktop/ProcThread/processes-and-threads) in the *OLE Programmer's Reference*.
27
27
28
28
## Why Support Apartment-Model Threading
29
29
Controls that support apartment-model threading can be used in multithreaded container applications that also support the apartment model. If you do not enable apartment-model threading, you will limit the potential set of containers in which your control could be used.
Copy file name to clipboardExpand all lines: docs/parallel/avoiding-problem-areas-with-multithread-programs.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ ms.author: "mblome"
12
12
ms.workload: ["cplusplus"]
13
13
---
14
14
# Avoiding Problem Areas with Multithread Programs
15
-
There are several problems you might encounter in creating, linking, or executing a multithread C program. Some of the more common problems are described in the following table. (For a similar discussion from the MFC point of view, see [Multithreading: Programming Tips](../parallel/multithreading-programming-tips.md).)
15
+
There are several problems you might encounter in creating, linking, or executing a multithread C program. Some of the more common problems are described in the following table. (For a similar discussion from the MFC point of view, see [Multithreading: Programming Tips](multithreading-programming-tips.md).)
16
16
17
17
|Problem|Probable cause|
18
18
|-------------|--------------------|
@@ -21,4 +21,4 @@ There are several problems you might encounter in creating, linking, or executin
21
21
22
22
## See Also
23
23
24
-
[Multithreading with C and Win32](../parallel/multithreading-with-c-and-win32.md)
24
+
[Multithreading with C and Win32](multithreading-with-c-and-win32.md)
Copy file name to clipboardExpand all lines: docs/parallel/multithread-programs.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,8 +16,8 @@ A thread is basically a path of execution through a program. It is also the smal
16
16
17
17
A process consists of one or more threads and the code, data, and other resources of a program in memory. Typical program resources are open files, semaphores, and dynamically allocated memory. A program executes when the system scheduler gives one of its threads execution control. The scheduler determines which threads should run and when they should run. Threads of lower priority might have to wait while higher priority threads complete their tasks. On multiprocessor machines, the scheduler can move individual threads to different processors to balance the CPU load.
18
18
19
-
Each thread in a process operates independently. Unless you make them visible to each other, the threads execute individually and are unaware of the other threads in a process. Threads sharing common resources, however, must coordinate their work by using semaphores or another method of interprocess communication. For more information about synchronizing threads, see [Writing a Multithreaded Win32 Program](../parallel/writing-a-multithreaded-win32-program.md).
19
+
Each thread in a process operates independently. Unless you make them visible to each other, the threads execute individually and are unaware of the other threads in a process. Threads sharing common resources, however, must coordinate their work by using semaphores or another method of interprocess communication. For more information about synchronizing threads, see [Writing a Multithreaded Win32 Program](writing-a-multithreaded-win32-program.md).
20
20
21
21
## See Also
22
22
23
-
[Multithreading with C and Win32](../parallel/multithreading-with-c-and-win32.md)
23
+
[Multithreading with C and Win32](multithreading-with-c-and-win32.md)
A user-interface thread is commonly used to handle user input and respond to user events independently of threads executing other portions of the application. The main application thread (provided in your `CWinApp`-derived class) is already created and started for you. This topic describes the steps necessary to create additional user-interface threads.
17
17
18
18
The first thing you must do when creating a user-interface thread is derive a class from [CWinThread](../mfc/reference/cwinthread-class.md). You must declare and implement this class, using the [DECLARE_DYNCREATE](../mfc/reference/run-time-object-model-services.md#declare_dyncreate) and [IMPLEMENT_DYNCREATE](../mfc/reference/run-time-object-model-services.md#implement_dyncreate) macros. This class must override some functions and can override others. These functions and what they should do are presented in the following table.
@@ -21,7 +21,6 @@ The first thing you must do when creating a user-interface thread is derive a cl
21
21
22
22
|Function|Purpose|
23
23
|--------------|-------------|
24
-
25
24
|[ExitInstance](../mfc/reference/cwinthread-class.md#exitinstance)|Perform cleanup when thread terminates. Usually overridden.|
26
25
|[InitInstance](../mfc/reference/cwinthread-class.md#initinstance)|Perform thread instance initialization. Must be overridden.|
27
26
|[OnIdle](../mfc/reference/cwinthread-class.md#onidle)|Perform thread-specific idle-time processing. Not usually overridden.|
@@ -46,12 +45,12 @@ MFC provides two versions of `AfxBeginThread` through parameter overloading: one
0 commit comments