Click here to Skip to main content
15,897,518 members
Home / Discussions / C#
   

C#

 
GeneralRe: Passing TextWriter through a function Pin
Steve-Co31-Mar-10 2:47
Steve-Co31-Mar-10 2:47 
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 
Hi,
I have an event registered to receive serial port data. to my understanding this is done in a separate thread than the one registered in. Ok now in my serial port data receive event i take the data generate a message and send to a windows message queue. method to implement sending is a static method in a separate class library.

Problems.
When data is received and the static method is called , suddenly a new thread is generated and it keeps on doing that for each data received even though i havent spawned any new thread. i have taken the method from the library pasted it in my current working class scope and the same thing happens.
but if i write the sending stuff in the event itself this doesnot happen and everything works just fine.

So to my understanding a different thread is accessing a different thread so there could be safety issues or something else. Do i need to make some kind of asynchronous calls or any other solution please.
I want the function to remain in class library outside the scope of this class.
Can anyone help me with this matter.
Thank you!!! in advance.
AnswerRe: Safe thread calls Pin
Luc Pattyn31-Mar-10 1:52
sitebuilderLuc Pattyn31-Mar-10 1:52 
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 

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.