<gcConcurrent> Element
Specifies whether the common language runtime runs garbage collection on a separate thread.
<configuration> Element
<runtime> Element
<gcConcurrent> Element
<gcConcurrent
enabled="true|false"/>
Attributes and Elements
The following sections describe attributes, child elements, and parent elements.
Attributes
Attribute |
Description |
---|---|
enabled |
Required attribute. Specifies whether the runtime runs garbage collection concurrently. |
enabled Attribute
Value |
Description |
---|---|
false |
Does not run garbage collection concurrently. |
true |
Runs garbage collection concurrently. This is the default. |
Child Elements
None.
Parent Elements
Element |
Description |
---|---|
configuration |
The root element in every configuration file used by the common language runtime and .NET Framework applications. |
runtime |
Contains information about assembly binding and garbage collection. |
Remarks
The setting in the machine configuration file is the default for all .NET Framework applications. The machine configuration file setting overrides the application configuration file setting.
If your application is single-threaded and involves heavy user interaction, leave concurrent garbage collection enabled to minimize the application's pause time to perform garbage collection. If your application is an ASP.NET server application you do not need to alter the default value of the gcConcurrent element.
Note
Concurrent garbage collection is not supported in applications running the WOW64 x86 emulator on 64-bit systems that implement the Intel Itanium architecture (formerly called IA-64). For more information about using WOW64 on 64-bit Windows systems, see Running 32-bit Applications.
Example
The following example shows how to disable concurrent garbage collection.
<configuration>
<runtime>
<gcConcurrent enabled="false"/>
</runtime>
</configuration>
See Also
Tasks
How to: Disable Concurrent Garbage Collection