Click here to Skip to main content
15,908,445 members
Home / Discussions / C#
   

C#

 
GeneralRe: Passing TextWriter through a function Pin
Keith Barrow31-Mar-10 2:58
professionalKeith Barrow31-Mar-10 2:58 
GeneralRe: Passing TextWriter through a function Pin
Mirko198031-Mar-10 3:00
Mirko198031-Mar-10 3:00 
AnswerRe: Passing TextWriter through a function Pin
R. Giskard Reventlov31-Mar-10 2:45
R. Giskard Reventlov31-Mar-10 2:45 
GeneralRe: Passing TextWriter through a function Pin
Luc Pattyn31-Mar-10 2:54
sitebuilderLuc Pattyn31-Mar-10 2:54 
GeneralRe: Passing TextWriter through a function Pin
R. Giskard Reventlov31-Mar-10 2:59
R. Giskard Reventlov31-Mar-10 2:59 
AnswerRe: Passing TextWriter through a function Pin
Steve-Co31-Mar-10 2:56
Steve-Co31-Mar-10 2:56 
QuestionSafe thread calls Pin
faheemnadeem31-Mar-10 1:41
faheemnadeem31-Mar-10 1:41 
AnswerRe: Safe thread calls Pin
Luc Pattyn31-Mar-10 1:52
sitebuilderLuc Pattyn31-Mar-10 1:52 
Hi,

the DataReceived and ErrorReceived events fire on a ThreadPool thread. AFAIK it is always one and the same thread for any given serial port. You do not need to create yet another thread to handle the data; when you want to access some data structures (maybe a collection), you would need thread synchronization, most likely a simple lock would suffice. And when you would like to access some GUI Controls, you would need a Control.InvokeRequired/Control.Invoke pattern.

static is irrelevant in this context.
if your code keeps creating new threads, that does not make sense.
you do not need to add any asynchronous calls.

if you want specific help, post specific information and (part of) actual code.

Smile | :)

GeneralRe: Safe thread calls Pin
faheemnadeem31-Mar-10 2:04
faheemnadeem31-Mar-10 2:04 
GeneralRe: Safe thread calls Pin
Luc Pattyn31-Mar-10 2:26
sitebuilderLuc Pattyn31-Mar-10 2:26 
GeneralRe: Safe thread calls Pin
faheemnadeem31-Mar-10 2:39
faheemnadeem31-Mar-10 2:39 
AnswerRe: Safe thread calls Pin
Alan N31-Mar-10 3:02
Alan N31-Mar-10 3:02 
GeneralRe: Safe thread calls Pin
faheemnadeem31-Mar-10 3:24
faheemnadeem31-Mar-10 3:24 
AnswerRe: Safe thread calls Pin
faheemnadeem31-Mar-10 21:18
faheemnadeem31-Mar-10 21:18 
QuestionOutof memory exception creating a thumbnail Pin
Mycroft Holmes31-Mar-10 1:21
professionalMycroft Holmes31-Mar-10 1:21 
AnswerRe: Outof memory exception creating a thumbnail Pin
Luc Pattyn31-Mar-10 1:58
sitebuilderLuc Pattyn31-Mar-10 1:58 
GeneralRe: Outof memory exception creating a thumbnail Pin
Bernhard Hiller31-Mar-10 2:19
Bernhard Hiller31-Mar-10 2:19 
GeneralRe: Outof memory exception creating a thumbnail Pin
Luc Pattyn31-Mar-10 2:28
sitebuilderLuc Pattyn31-Mar-10 2:28 
GeneralRe: Outof memory exception creating a thumbnail Pin
Mycroft Holmes31-Mar-10 12:09
professionalMycroft Holmes31-Mar-10 12:09 
GeneralRe: Outof memory exception creating a thumbnail Pin
Luc Pattyn31-Mar-10 12:29
sitebuilderLuc Pattyn31-Mar-10 12:29 
GeneralRe: Outof memory exception creating a thumbnail Pin
Mycroft Holmes31-Mar-10 12:58
professionalMycroft Holmes31-Mar-10 12:58 
QuestionPointToScreen and multiple monitors Pin
vlasto7731-Mar-10 1:18
vlasto7731-Mar-10 1:18 
AnswerRe: PointToScreen and multiple monitors Pin
V.31-Mar-10 3:03
professionalV.31-Mar-10 3:03 
GeneralRe: PointToScreen and multiple monitors Pin
vlasto7731-Mar-10 3:14
vlasto7731-Mar-10 3:14 
GeneralRe: PointToScreen and multiple monitors Pin
V.31-Mar-10 3:26
professionalV.31-Mar-10 3:26 

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.