Click here to Skip to main content
16,021,687 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: .net 6.0 web api how increment request timeout? Pin
Richard Deeming25-Oct-22 1:48
mveRichard Deeming25-Oct-22 1:48 
QuestionWays to migrate a Silverlight application? Pin
Member 1579410912-Oct-22 22:54
Member 1579410912-Oct-22 22:54 
AnswerRe: Ways to migrate a Silverlight application? Pin
Richard Deeming12-Oct-22 23:27
mveRichard Deeming12-Oct-22 23:27 
Questioncsv file sort and create a new and store the data Pin
Member 1577533021-Sep-22 20:52
Member 1577533021-Sep-22 20:52 
AnswerRe: csv file sort and create a new and store the data Pin
Richard Deeming21-Sep-22 21:31
mveRichard Deeming21-Sep-22 21:31 
QuestionPLINQ - WithDegreeOfParallelism Pin
dataminers9-Sep-22 5:27
dataminers9-Sep-22 5:27 
AnswerRe: PLINQ - WithDegreeOfParallelism Pin
Richard MacCutchan9-Sep-22 5:50
mveRichard MacCutchan9-Sep-22 5:50 
GeneralRe: PLINQ - WithDegreeOfParallelism Pin
dataminers9-Sep-22 10:18
dataminers9-Sep-22 10:18 
Dear Richard, thank you for your reply.

I understand that based on your answer, the two code blocks below are the same;

C#
await Task.Run(() =>
{
    CalculateSomething(5);
});

await Task.Run(() =>
{
    CalculateSomething(8);
});


C#
List<int> myList = new() { 5, 8 };

myList.AsParallel().WithDegreeOfParallelism(2).ForAll(x =>
{
    CalculateSomething(x);
});



Both complete the process on two Threads.

Note: CalculateSomething hypothetically this function takes a very long time

Regards...

modified 9-Sep-22 17:15pm.

GeneralRe: PLINQ - WithDegreeOfParallelism Pin
Richard MacCutchan9-Sep-22 21:53
mveRichard MacCutchan9-Sep-22 21:53 
GeneralRe: PLINQ - WithDegreeOfParallelism Pin
dataminers11-Sep-22 2:01
dataminers11-Sep-22 2:01 
GeneralRe: PLINQ - WithDegreeOfParallelism Pin
Dave Kreskowiak11-Sep-22 4:36
mveDave Kreskowiak11-Sep-22 4:36 
GeneralRe: PLINQ - WithDegreeOfParallelism Pin
Richard Deeming11-Sep-22 21:39
mveRichard Deeming11-Sep-22 21:39 
QuestionMultiThread on Single Core Processor (CPU) Pin
dataminers6-Sep-22 3:24
dataminers6-Sep-22 3:24 
AnswerRe: MultiThread on Single Core Processor (CPU) Pin
dan!sh 6-Sep-22 3:46
professional dan!sh 6-Sep-22 3:46 
GeneralRe: MultiThread on Single Core Processor (CPU) Pin
dataminers6-Sep-22 22:28
dataminers6-Sep-22 22:28 
AnswerRe: MultiThread on Single Core Processor (CPU) Pin
Eddy Vluggen6-Sep-22 4:20
professionalEddy Vluggen6-Sep-22 4:20 
AnswerRe: MultiThread on Single Core Processor (CPU) Pin
Dave Kreskowiak6-Sep-22 4:38
mveDave Kreskowiak6-Sep-22 4:38 
GeneralRe: MultiThread on Single Core Processor (CPU) Pin
Eddy Vluggen6-Sep-22 5:14
professionalEddy Vluggen6-Sep-22 5:14 
GeneralRe: MultiThread on Single Core Processor (CPU) Pin
Dave Kreskowiak6-Sep-22 5:18
mveDave Kreskowiak6-Sep-22 5:18 
GeneralRe: MultiThread on Single Core Processor (CPU) Pin
Eddy Vluggen6-Sep-22 5:19
professionalEddy Vluggen6-Sep-22 5:19 
AnswerRe: MultiThread on Single Core Processor (CPU) Pin
Sam Hobbs5-Oct-22 20:19
Sam Hobbs5-Oct-22 20:19 
Question_ViewImports.cshtml question Pin
pkfox23-Aug-22 22:15
professionalpkfox23-Aug-22 22:15 
AnswerRe: _ViewImports.cshtml question Pin
Richard Deeming23-Aug-22 22:47
mveRichard Deeming23-Aug-22 22:47 
GeneralRe: _ViewImports.cshtml question Pin
pkfox23-Aug-22 23:13
professionalpkfox23-Aug-22 23:13 
GeneralRe: _ViewImports.cshtml question Pin
Richard Deeming23-Aug-22 23:29
mveRichard Deeming23-Aug-22 23:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.