Click here to Skip to main content
15,889,527 members
Home / Discussions / C#
   

C#

 
GeneralRe: Cross-Threading problem, InvokeRequired and Events Pin
Wes Aday15-Feb-10 11:10
professionalWes Aday15-Feb-10 11:10 
AnswerRe: Cross-Threading problem, InvokeRequired and Events Pin
Luc Pattyn15-Feb-10 8:37
sitebuilderLuc Pattyn15-Feb-10 8:37 
GeneralRe: Cross-Threading problem, InvokeRequired and Events Pin
User 680178015-Feb-10 9:55
User 680178015-Feb-10 9:55 
GeneralRe: Cross-Threading problem, InvokeRequired and Events Pin
Luc Pattyn15-Feb-10 10:01
sitebuilderLuc Pattyn15-Feb-10 10:01 
QuestionRe: Cross-Threading problem, InvokeRequired and Events Pin
User 680178015-Feb-10 10:23
User 680178015-Feb-10 10:23 
AnswerRe: Cross-Threading problem, InvokeRequired and Events Pin
Luc Pattyn15-Feb-10 10:32
sitebuilderLuc Pattyn15-Feb-10 10:32 
GeneralRe: Cross-Threading problem, InvokeRequired and Events Pin
User 680178015-Feb-10 10:38
User 680178015-Feb-10 10:38 
GeneralRe: Cross-Threading problem, InvokeRequired and Events Pin
Luc Pattyn15-Feb-10 11:30
sitebuilderLuc Pattyn15-Feb-10 11:30 
My clarification suggestions:

- Don't change identifier names, especially method names; methodA, methodB, ... don't make an easy reading, besides they never got called anywhere.

- Also show relevant code together with the method declaration it is in.

- And please explain what your app does, so the reader can get a mental picture of the overall code.

- Maybe explain the overall structure (methods, possibly threads) using pseudo-code (with the actual names if possible).

- you complain about performance; please explain. Maybe title bar says "... (Not Responding)"? Maybe output that came at 100 lines per second now comes at 3 lines per second. What?

Other suggestions:

- each InvokeRequired/Invoke is likely to cause a thread switch, i.e. waste a few microseconds. Sending millions of updates to a Control (say a ProgressBar) which might have only a very limited number of states (0 to 100%) is to be avoided; maybe update only 1 out of 1000 in a loop, or only every 100 milliseconds, or...

Smile | :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]

I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that.
All Toronto weekends should be extremely wet until we get it automated in regular forums, not just QA.

GeneralRe: Cross-Threading problem, InvokeRequired and Events Pin
User 680178015-Feb-10 10:45
User 680178015-Feb-10 10:45 
GeneralRe: Cross-Threading problem, InvokeRequired and Events Pin
Luc Pattyn15-Feb-10 11:23
sitebuilderLuc Pattyn15-Feb-10 11:23 
GeneralRe: Cross-Threading problem, InvokeRequired and Events Pin
Daniel Grunwald16-Feb-10 8:41
Daniel Grunwald16-Feb-10 8:41 
GeneralRe: Cross-Threading problem, InvokeRequired and Events Pin
Luc Pattyn16-Feb-10 9:06
sitebuilderLuc Pattyn16-Feb-10 9:06 
GeneralRe: Cross-Threading problem, InvokeRequired and Events Pin
Daniel Grunwald16-Feb-10 9:26
Daniel Grunwald16-Feb-10 9:26 
GeneralRe: Cross-Threading problem, InvokeRequired and Events Pin
User 680178016-Feb-10 9:42
User 680178016-Feb-10 9:42 
GeneralRe: Cross-Threading problem, InvokeRequired and Events Pin
Daniel Grunwald16-Feb-10 9:49
Daniel Grunwald16-Feb-10 9:49 
GeneralRe: Cross-Threading problem, InvokeRequired and Events Pin
User 680178016-Feb-10 9:52
User 680178016-Feb-10 9:52 
GeneralRe: Cross-Threading problem, InvokeRequired and Events Pin
Daniel Grunwald16-Feb-10 9:59
Daniel Grunwald16-Feb-10 9:59 
GeneralRe: Cross-Threading problem, InvokeRequired and Events Pin
User 680178016-Feb-10 10:31
User 680178016-Feb-10 10:31 
GeneralRe: Cross-Threading problem, InvokeRequired and Events Pin
Daniel Grunwald16-Feb-10 8:45
Daniel Grunwald16-Feb-10 8:45 
GeneralRe: Cross-Threading problem, InvokeRequired and Events Pin
User 680178016-Feb-10 9:08
User 680178016-Feb-10 9:08 
GeneralRe: Cross-Threading problem, InvokeRequired and Events Pin
Daniel Grunwald16-Feb-10 9:39
Daniel Grunwald16-Feb-10 9:39 
GeneralRe: Cross-Threading problem, InvokeRequired and Events Pin
Luc Pattyn16-Feb-10 9:45
sitebuilderLuc Pattyn16-Feb-10 9:45 
GeneralRe: Cross-Threading problem, InvokeRequired and Events Pin
User 680178016-Feb-10 10:02
User 680178016-Feb-10 10:02 
GeneralRe: Cross-Threading problem, InvokeRequired and Events Pin
User 680178016-Feb-10 10:09
User 680178016-Feb-10 10:09 
GeneralRe: Cross-Threading problem, InvokeRequired and Events Pin
User 680178017-Feb-10 7:05
User 680178017-Feb-10 7:05 

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.