Click here to Skip to main content
15,909,645 members
Home / Discussions / C#
   

C#

 
AnswerRe: Aynchronous approach on event Pin
Afzaal Ahmad Zeeshan17-Aug-15 23:26
professionalAfzaal Ahmad Zeeshan17-Aug-15 23:26 
A very simple one would be to create a task and run it,

C#
Task.Run(async () => 
{ 
   // Your code to load the content with awaits
   // To put it on a separate thread
});


Otherwise, you can always consider using asynchronous programming model[^]. In which you create methods, functions with async modifiers and then use the awaits to continue processing until the work (job, whatever) has been done.

C#
public async void getData(){
  // Assume Task<int> GetDataAsync() { gets the data from server }
  app.IntVariable = await server.GetDataAsync(); // await would fetch the int value
}


Also, since the error is Time out I would suggest that you configure your server also. There may be a problem with that, Timeout would occur regardless of async or sync programming being used.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~

QuestionRe: Aynchronous approach on event Pin
Ravi Bhavnani18-Aug-15 4:55
professionalRavi Bhavnani18-Aug-15 4:55 
AnswerRe: Aynchronous approach on event Pin
dabuskol23-Aug-15 1:07
dabuskol23-Aug-15 1:07 
AnswerRe: Aynchronous approach on event Pin
dabuskol8-Sep-15 20:15
dabuskol8-Sep-15 20:15 
Questionmysql data reader Pin
abdujalilc17-Aug-15 20:13
abdujalilc17-Aug-15 20:13 
AnswerRe: mysql data reader Pin
OriginalGriff17-Aug-15 21:39
mveOriginalGriff17-Aug-15 21:39 
QuestionCheap scanner and OCR library for MVC web applications Pin
ShikhaSC17-Aug-15 19:09
ShikhaSC17-Aug-15 19:09 
AnswerRe: Cheap scanner and OCR library for MVC web applications Pin
F-ES Sitecore18-Aug-15 0:41
professionalF-ES Sitecore18-Aug-15 0:41 
AnswerRe: Cheap scanner and OCR library for MVC web applications Pin
Ravi Bhavnani18-Aug-15 4:57
professionalRavi Bhavnani18-Aug-15 4:57 
GeneralRe: Cheap scanner and OCR library for MVC web applications Pin
ShikhaSC18-Aug-15 18:18
ShikhaSC18-Aug-15 18:18 
GeneralRe: Cheap scanner and OCR library for MVC web applications Pin
Ravi Bhavnani19-Aug-15 2:21
professionalRavi Bhavnani19-Aug-15 2:21 
QuestionHo to convert BLOB data to readable format Pin
narasingubhanu17-Aug-15 0:03
narasingubhanu17-Aug-15 0:03 
AnswerRe: Ho to convert BLOB data to readable format Pin
OriginalGriff17-Aug-15 0:12
mveOriginalGriff17-Aug-15 0:12 
GeneralRe: Ho to convert BLOB data to readable format Pin
narasingubhanu17-Aug-15 0:16
narasingubhanu17-Aug-15 0:16 
GeneralRe: Ho to convert BLOB data to readable format Pin
OriginalGriff17-Aug-15 0:36
mveOriginalGriff17-Aug-15 0:36 
AnswerRe: Ho to convert BLOB data to readable format Pin
Afzaal Ahmad Zeeshan17-Aug-15 1:06
professionalAfzaal Ahmad Zeeshan17-Aug-15 1:06 
GeneralRe: Ho to convert BLOB data to readable format Pin
narasingubhanu17-Aug-15 1:44
narasingubhanu17-Aug-15 1:44 
GeneralRe: Ho to convert BLOB data to readable format Pin
Afzaal Ahmad Zeeshan17-Aug-15 1:50
professionalAfzaal Ahmad Zeeshan17-Aug-15 1:50 
GeneralRe: Ho to convert BLOB data to readable format Pin
narasingubhanu17-Aug-15 2:18
narasingubhanu17-Aug-15 2:18 
GeneralRe: Ho to convert BLOB data to readable format Pin
Afzaal Ahmad Zeeshan17-Aug-15 2:23
professionalAfzaal Ahmad Zeeshan17-Aug-15 2:23 
QuestionSent from one computer to another keystroke Pin
goldsoft15-Aug-15 19:15
goldsoft15-Aug-15 19:15 
AnswerRe: Sent from one computer to another keystroke Pin
Dave Kreskowiak16-Aug-15 4:30
mveDave Kreskowiak16-Aug-15 4:30 
Questionc++ Qt or C# or JAVA !! Pin
Dreamer_X15-Aug-15 3:51
Dreamer_X15-Aug-15 3:51 
AnswerRe: c++ Qt or C# or JAVA !! Pin
OriginalGriff15-Aug-15 3:54
mveOriginalGriff15-Aug-15 3:54 
GeneralRe: c++ Qt or C# or JAVA !! Pin
Nish Nishant15-Aug-15 5:18
sitebuilderNish Nishant15-Aug-15 5:18 

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.