Click here to Skip to main content
15,891,657 members
Home / Discussions / C#
   

C#

 
QuestionWhy my .NET application is crashing?! Pin
Jassim Rahma26-Oct-15 23:42
Jassim Rahma26-Oct-15 23:42 
AnswerRe: Why my .NET application is crashing?! Pin
Pete O'Hanlon27-Oct-15 0:00
mvePete O'Hanlon27-Oct-15 0:00 
AnswerRe: Why my .NET application is crashing?! Pin
John Torjo27-Oct-15 1:45
professionalJohn Torjo27-Oct-15 1:45 
AnswerRe: Why my .NET application is crashing?! Pin
Dave Kreskowiak27-Oct-15 2:29
mveDave Kreskowiak27-Oct-15 2:29 
QuestionWorking on multithreading application Pin
Member 1132358526-Oct-15 23:39
Member 1132358526-Oct-15 23:39 
AnswerRe: Working on multithreading application Pin
Daniel Pfeffer27-Oct-15 1:23
professionalDaniel Pfeffer27-Oct-15 1:23 
GeneralRe: Working on multithreading application Pin
BillWoodruff27-Oct-15 3:29
professionalBillWoodruff27-Oct-15 3:29 
GeneralRe: Working on multithreading application Pin
Daniel Pfeffer27-Oct-15 4:05
professionalDaniel Pfeffer27-Oct-15 4:05 
Not unless the display must be updated within a very short time of the map update (e.g. well under 1 second).

What you need is some sort of event that notifies the GUI thread that an update has occurred. The GUI thread may then (in its own good time) take a "snapshot" of the data, and process it. Note that this is an event like any other, so it should fit nicely into the event-driven model used by the GUI thread.

Assuming that any single update of the map does not consume too much processor time, this will appear transparent to the user. At most, the display will lag slightly behind the updates if many updates are to be performed at the same time.

If you use blocking synchronization, the trick is to ensure that (a) the writing thread does not block the GUI thread for too long, and (b) that neither thread crashes while holding the lock. If you use "lock-free" methods, these problems go away.
If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack.

--Winston Churchill

AnswerRe: Working on multithreading application Pin
Foothill27-Oct-15 4:30
professionalFoothill27-Oct-15 4:30 
AnswerRe: Working on multithreading application Pin
Gerry Schmitz27-Oct-15 7:23
mveGerry Schmitz27-Oct-15 7:23 
Questionnew to C# Pin
Member 1206164726-Oct-15 18:39
Member 1206164726-Oct-15 18:39 
AnswerRe: new to C# Pin
Garth J Lancaster26-Oct-15 19:34
professionalGarth J Lancaster26-Oct-15 19:34 
AnswerRe: new to C# Pin
John Torjo26-Oct-15 19:51
professionalJohn Torjo26-Oct-15 19:51 
AnswerRe: new to C# Pin
OriginalGriff26-Oct-15 22:50
mveOriginalGriff26-Oct-15 22:50 
AnswerRe: new to C# Pin
BillWoodruff27-Oct-15 1:43
professionalBillWoodruff27-Oct-15 1:43 
Questionchart axis offset when reflesh data Pin
smallkubi26-Oct-15 1:29
smallkubi26-Oct-15 1:29 
AnswerRe: chart axis offset when reflesh data Pin
John Torjo26-Oct-15 6:06
professionalJohn Torjo26-Oct-15 6:06 
QuestionI have this code in C # more people basic_info returns 0!? Can someone help me? Pin
Member 1208599525-Oct-15 9:05
Member 1208599525-Oct-15 9:05 
AnswerRe: I have this code in C # more people basic_info returns 0!? Can someone help me? Pin
BillWoodruff25-Oct-15 9:13
professionalBillWoodruff25-Oct-15 9:13 
GeneralRe: I have this code in C # more people basic_info returns 0!? Can someone help me? Pin
Member 1208599525-Oct-15 9:24
Member 1208599525-Oct-15 9:24 
GeneralRe: I have this code in C # more people basic_info returns 0!? Can someone help me? Pin
BillWoodruff25-Oct-15 11:25
professionalBillWoodruff25-Oct-15 11:25 
AnswerRe: I have this code in C # more people basic_info returns 0!? Can someone help me? Pin
Member 1208599525-Oct-15 9:18
Member 1208599525-Oct-15 9:18 
GeneralRe: I have this code in C # more people basic_info returns 0!? Can someone help me? Pin
Member 1208599525-Oct-15 9:23
Member 1208599525-Oct-15 9:23 
GeneralRe: I have this code in C # more people basic_info returns 0!? Can someone help me? Pin
Pete O'Hanlon25-Oct-15 12:06
mvePete O'Hanlon25-Oct-15 12:06 
GeneralRe: I have this code in C # more people basic_info returns 0!? Can someone help me? Pin
Member 1208599525-Oct-15 12:16
Member 1208599525-Oct-15 12:16 

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.