Click here to Skip to main content
15,885,757 members
Home / Discussions / C#
   

C#

 
AnswerRe: Creating An Async Method Pin
Richard Deeming7-Oct-21 21:41
mveRichard Deeming7-Oct-21 21:41 
GeneralRe: Creating An Async Method Pin
Kevin Marois8-Oct-21 6:00
professionalKevin Marois8-Oct-21 6:00 
GeneralRe: Creating An Async Method Pin
Richard Deeming8-Oct-21 6:35
mveRichard Deeming8-Oct-21 6:35 
GeneralRe: Creating An Async Method Pin
Kevin Marois8-Oct-21 6:38
professionalKevin Marois8-Oct-21 6:38 
GeneralRe: Creating An Async Method Pin
Kevin Marois8-Oct-21 9:46
professionalKevin Marois8-Oct-21 9:46 
GeneralRe: Creating An Async Method Pin
lmoelleb9-Oct-21 0:18
lmoelleb9-Oct-21 0:18 
GeneralRe: Creating An Async Method Pin
Kevin Marois9-Oct-21 7:03
professionalKevin Marois9-Oct-21 7:03 
GeneralRe: Creating An Async Method Pin
lmoelleb10-Oct-21 8:56
lmoelleb10-Oct-21 8:56 
As mentioned by others - do not worry about the server side being async. The web host will simply spin up more threads to handle the calls concurrently - and the client software will not be able to detect if you use async or not on the server.

Sure there is a limit to how many threads you can have running - but most likely the SQL server will give up before your web server. If not, then it is some serious heavy processing you are running - and either you should let someone more experienced deal with it or just run more servers. Typically you would run two servers anyway if high availability is required.

Just to be clear: You do not have to start threads yourself for the web server to run requests concurrently. The web server will do that for you.

If you do not need to get every bit of performance out of the server, the main advantage in using async on the server side is that all modern libraries expect it - and some might no longer have sync method calls available. So if you write your code async, you will never have sync code calling async methods. Sure it can be done if needed, but you need to know what you are doing to avoid deadlocks. Async code calling sync methods is never an issue.
Question(xaml, wpf) ScrollViewer Binding confusion (beginner) (ANSWERED) Pin
Maximilien6-Oct-21 9:50
Maximilien6-Oct-21 9:50 
SuggestionRe: (xaml, wpf) ScrollViewer Binding confusion (beginner) Pin
Richard MacCutchan6-Oct-21 21:30
mveRichard MacCutchan6-Oct-21 21:30 
GeneralRe: (xaml, wpf) ScrollViewer Binding confusion (beginner) Pin
Maximilien7-Oct-21 3:49
Maximilien7-Oct-21 3:49 
AnswerRe: (xaml, wpf) ScrollViewer Binding confusion (beginner) Pin
Richard Deeming6-Oct-21 21:45
mveRichard Deeming6-Oct-21 21:45 
GeneralRe: (xaml, wpf) ScrollViewer Binding confusion (beginner) Pin
Maximilien8-Oct-21 3:03
Maximilien8-Oct-21 3:03 
QuestionCan't catch NullReferenceException while explicitly defined for that Pin
Exoskeletor1-Oct-21 23:03
Exoskeletor1-Oct-21 23:03 
AnswerRe: Can't catch NullReferenceException while explicitly defined for that Pin
Pete O'Hanlon1-Oct-21 23:38
mvePete O'Hanlon1-Oct-21 23:38 
AnswerRe: Can't catch NullReferenceException while explicitly defined for that Pin
OriginalGriff2-Oct-21 0:33
mveOriginalGriff2-Oct-21 0:33 
JokeRe: Can't catch NullReferenceException while explicitly defined for that Pin
Pete O'Hanlon2-Oct-21 1:32
mvePete O'Hanlon2-Oct-21 1:32 
GeneralRe: Can't catch NullReferenceException while explicitly defined for that Pin
OriginalGriff2-Oct-21 2:14
mveOriginalGriff2-Oct-21 2:14 
GeneralRe: Can't catch NullReferenceException while explicitly defined for that Pin
Exoskeletor2-Oct-21 3:01
Exoskeletor2-Oct-21 3:01 
GeneralRe: Can't catch NullReferenceException while explicitly defined for that Pin
Pete O'Hanlon2-Oct-21 3:51
mvePete O'Hanlon2-Oct-21 3:51 
GeneralRe: Can't catch NullReferenceException while explicitly defined for that Pin
OriginalGriff2-Oct-21 3:55
mveOriginalGriff2-Oct-21 3:55 
GeneralRe: Can't catch NullReferenceException while explicitly defined for that Pin
Exoskeletor2-Oct-21 3:58
Exoskeletor2-Oct-21 3:58 
GeneralRe: Can't catch NullReferenceException while explicitly defined for that Pin
Exoskeletor2-Oct-21 2:58
Exoskeletor2-Oct-21 2:58 
AnswerRe: Can't catch NullReferenceException while explicitly defined for that Pin
Pete O'Hanlon3-Oct-21 20:22
mvePete O'Hanlon3-Oct-21 20:22 
GeneralRe: Can't catch NullReferenceException while explicitly defined for that Pin
Exoskeletor4-Oct-21 0:21
Exoskeletor4-Oct-21 0:21 

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.