D
DaTurk
Here's a quick question, say I have a class with a main routine, we'll
just call it main.
Main is on the "main" thread.
Now lets have main creat an instance of another class, which creates a
thread, and has it do some
calculation, and on completion calls an event which main has += on.
Lets call this class, calcClass.
CalcClass is on the "calc" thread. "<I'm just making these statements
to confirm we have two threads>
OK, so we have main += on calcClass's event, and sending it to do it's
thing. So here's the question, Events are called synchronously by
default right, unless you use begin invoke or something. So, when an
event gets popped from calcClass, and we enter the eventhandling code
in main, we will be on calcClass's thread? Is this correct?
just call it main.
Main is on the "main" thread.
Now lets have main creat an instance of another class, which creates a
thread, and has it do some
calculation, and on completion calls an event which main has += on.
Lets call this class, calcClass.
CalcClass is on the "calc" thread. "<I'm just making these statements
to confirm we have two threads>
OK, so we have main += on calcClass's event, and sending it to do it's
thing. So here's the question, Events are called synchronously by
default right, unless you use begin invoke or something. So, when an
event gets popped from calcClass, and we enter the eventhandling code
in main, we will be on calcClass's thread? Is this correct?