J
Jamie Risk
What thread does the DataReceived event run on?
I'm preparing a design that uses the DataReceived event to
stimulate a protocol state machine (PSM). The ambition is to
have the serial process happen in the background, and when
certain conditions are met, the PSM then triggers an event
(myPacketIsHere for instance).
The PSM will only ever deal with the serial data sequentially,
i.e. through the use of locks and such, only one instance of the
PSM will run at any given time.
My questions then are:
* What thread does the DataReceivedEventHandler run on?
(Is it from the threadpool?)
* What's the best practiced method for having an event
handler keep state information between successive calls?
* When the PSM triggers its own event, what thread is the
event handler for that going to be running on.
(myPacketIsHereEventHandler())
If it isn't obvious that I'm weak on Delegates, and Threading,
I apologize ... the fact is I am.
- Jamie
I'm preparing a design that uses the DataReceived event to
stimulate a protocol state machine (PSM). The ambition is to
have the serial process happen in the background, and when
certain conditions are met, the PSM then triggers an event
(myPacketIsHere for instance).
The PSM will only ever deal with the serial data sequentially,
i.e. through the use of locks and such, only one instance of the
PSM will run at any given time.
My questions then are:
* What thread does the DataReceivedEventHandler run on?
(Is it from the threadpool?)
* What's the best practiced method for having an event
handler keep state information between successive calls?
* When the PSM triggers its own event, what thread is the
event handler for that going to be running on.
(myPacketIsHereEventHandler())
If it isn't obvious that I'm weak on Delegates, and Threading,
I apologize ... the fact is I am.
- Jamie