Click here to Skip to main content
15,910,981 members
Home / Discussions / C#
   

C#

 
GeneralRe: Thread Safety??? Pin
RizwanSharp19-Jul-06 9:50
RizwanSharp19-Jul-06 9:50 
GeneralPerhaps only one thread? Pin
Ennis Ray Lynch, Jr.19-Jul-06 10:32
Ennis Ray Lynch, Jr.19-Jul-06 10:32 
QuestionRe: Perhaps only one thread? Pin
RizwanSharp19-Jul-06 11:16
RizwanSharp19-Jul-06 11:16 
GeneralRe: Thread Safety??? Pin
Super Lloyd19-Jul-06 17:22
Super Lloyd19-Jul-06 17:22 
QuestionRe: Thread Safety??? Pin
Dustin Metzgar19-Jul-06 9:13
Dustin Metzgar19-Jul-06 9:13 
AnswerRe: Thread Safety??? Pin
RizwanSharp19-Jul-06 9:52
RizwanSharp19-Jul-06 9:52 
GeneralRe: Thread Safety??? Pin
Dustin Metzgar19-Jul-06 10:16
Dustin Metzgar19-Jul-06 10:16 
GeneralRe: Thread Safety??? Pin
RizwanSharp19-Jul-06 11:15
RizwanSharp19-Jul-06 11:15 
First of all yes! I'm maintainging locks on both read and write that is not problem with my case. The problem in my case is when
A piece of code calls
SendMessage(TextMessage textMessage)
{
// Doing work here
}
then an other piece of code calls this Method with a new object of TextMessage
Send(TextMessage textMessage)
{
// Doing work here
}
the second class overwrite the previous object of TextMessage Class and then the some part of data written to the stream is from the last object and one from the new object.
Its different from the scenerio you are pointing that stream is misbehaved. Stream is already locked and that is safe the only thing is grabbled is TextMessage Objec that is passed to the method.

Do you think I'm right?

If so then please suggest something. I'm really stucked at this problem.

Best Regards,
Rizwan
GeneralRe: Thread Safety??? Pin
Dustin Metzgar19-Jul-06 11:25
Dustin Metzgar19-Jul-06 11:25 
GeneralRe: Thread Safety??? Pin
RizwanSharp19-Jul-06 11:35
RizwanSharp19-Jul-06 11:35 
GeneralRe: Thread Safety??? Pin
Dustin Metzgar19-Jul-06 13:45
Dustin Metzgar19-Jul-06 13:45 
AnswerGot the actual problem!!! Pin
RizwanSharp19-Jul-06 21:43
RizwanSharp19-Jul-06 21:43 
GeneralRe: Got the actual problem!!! Pin
Dustin Metzgar20-Jul-06 5:23
Dustin Metzgar20-Jul-06 5:23 
GeneralSolved ;) Pin
RizwanSharp20-Jul-06 5:33
RizwanSharp20-Jul-06 5:33 
QuestionHow to get some special Windows colors? Pin
NPowDev19-Jul-06 7:25
NPowDev19-Jul-06 7:25 
AnswerRe: How to get some special Windows colors? Pin
Judah Gabriel Himango19-Jul-06 7:29
sponsorJudah Gabriel Himango19-Jul-06 7:29 
Generaland System.Drawing.SystemColors Pin
Ennis Ray Lynch, Jr.19-Jul-06 8:35
Ennis Ray Lynch, Jr.19-Jul-06 8:35 
GeneralRe: How to get some special Windows colors? Pin
NPowDev19-Jul-06 12:06
NPowDev19-Jul-06 12:06 
GeneralRe: How to get some special Windows colors? Pin
Judah Gabriel Himango19-Jul-06 17:14
sponsorJudah Gabriel Himango19-Jul-06 17:14 
GeneralRe: How to get some special Windows colors? [modified] Pin
NPowDev20-Jul-06 1:45
NPowDev20-Jul-06 1:45 
GeneralRe: How to get some special Windows colors? Pin
Judah Gabriel Himango20-Jul-06 4:36
sponsorJudah Gabriel Himango20-Jul-06 4:36 
Questionerror Pin
TAREQ F ABUZUHRI19-Jul-06 7:04
TAREQ F ABUZUHRI19-Jul-06 7:04 
AnswerRe: error Pin
Judah Gabriel Himango19-Jul-06 7:12
sponsorJudah Gabriel Himango19-Jul-06 7:12 
QuestionAdd attributes to XML doc [modified] Pin
VK-Cadec19-Jul-06 6:47
VK-Cadec19-Jul-06 6:47 
AnswerRe: Add attributes to XML doc Pin
stancrm19-Jul-06 7:21
stancrm19-Jul-06 7:21 

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.