Skip to content

Commit aa2f168

Browse files
committed
Added dotnet core ref to FAQs
1 parent 13dc34e commit aa2f168

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

articles/azure-cache-for-redis/cache-management-faq.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,19 @@ sections:
140140
ThreadPool.SetMinThreads(minThreads, minThreads);
141141
}
142142
```
143-
143+
If you ae using dotnet Core, you would set it in `Program.cs`, just before the call to WebApplication.CreateBuilder():
144+
145+
```csharp
146+
private readonly int minThreads = 200
147+
148+
ThreadPool.SetMinThreads(minThreads, minThreads);
149+
150+
var builder = WebApplication.CreateBuilder(args);
151+
// rest of application setup
152+
```
153+
144154
> [!NOTE]
145-
> The value specified by this method is a global setting, affecting the whole AppDomain. For example, if you have a 4-core machine and want to set *minWorkerThreads* and *minIoThreads* to 50 per CPU during run-time, use **ThreadPool.SetMinThreads(200, 200)**.
155+
> The value specified by this method is a global setting, affecting the whole AppDomain. For example, if you have a 4-core machine and want to set *minWorkerThreads* and *minIoThreads* to 50 per CPU during run-time, use `ThreadPool.SetMinThreads(200, 200)`.
146156

147157
* It is also possible to specify the minimum threads setting by using the [*minIoThreads* or *minWorkerThreads* configuration setting](/previous-versions/dotnet/netframework-4.0/7w2sway1(v=vs.100)) under the `<processModel>` configuration element in `Machine.config`. `Machine.config` is typically located at `%SystemRoot%\Microsoft.NET\Framework\[versionNumber]\CONFIG\`. **Setting the number of minimum threads in this way isn't recommended because it's a System-wide setting.**
148158

articles/azure-cache-for-redis/managed-redis/managed-redis-management-faq.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,16 @@ sections:
109109
ThreadPool.SetMinThreads(minThreads, minThreads);
110110
}
111111
```
112-
112+
If you ae using dotnet Core, you would set it in `Program.cs`, just before the call to WebApplication.CreateBuilder():
113+
114+
```csharp
115+
private readonly int minThreads = 200
116+
117+
ThreadPool.SetMinThreads(minThreads, minThreads);
118+
119+
var builder = WebApplication.CreateBuilder(args);
120+
// rest of application setup
121+
```
113122
> [!NOTE]
114123
> The value specified by this method is a global setting, affecting the whole AppDomain. For example, if you have a machine with four cores and want to set *minWorkerThreads* and *minIoThreads* to 50 per CPU during run-time, use **ThreadPool.SetMinThreads(200, 200)**.
115124

0 commit comments

Comments
 (0)