Re: Events and threads ... whose thread am I on anyway?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



This class was designed specifically to stay away from TP threads. SO
we can just create a single worker thread that handles the task
alotted for it.

On Jan 29, 10:33 am, "William Stacey [C# MVP]"
<william.sta...@xxxxxxxxx> wrote:
Also note, some events "may" be raised using a TP thread if the class
designer invoked the handlers that way. This is something you may also need
to do yourself under some cases (i.e. invoke them manually).

--
William Stacey [C# MVP]
PCR concurrency library:www.codeplex.com/pcr

"DaTurk" <mmagd...@xxxxxxxxxxx> wrote in messagenews:1170085276.062832.248290@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
| 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?
|

.



Relevant Pages

  • Re: Behe: God May be Dead
    ... > Brett Aubrey wrote: ... >>> a single designer. ... >> invoke it one level up. ... Which means that anyone can invoke their faith to ...
    (talk.origins)
  • Re: OT: Gravity explained
    ... something "unexplained" (in their mind) in evolution, they invoke "the ... designer". ...
    (sci.electronics.design)
  • Re: OT: Gravity explained
    ... something "unexplained" (in their mind) in evolution, they invoke "the ... designer". ...
    (sci.electronics.design)