Home All Groups Group Topic Archive Search About

Queue Thread Safe question

Author
31 Mar 2005 5:43 PM
Shane Story
The Collections.Queue class has a Synchronized property.

My colleague was saying that this means that we can use the queue in a
multi-threaded app and not worry about normal threading issues.

Is this true, or is it a faulty assumption and would he still need to use
Reader/Writer locks?

Thanks,

Shane

Author
31 Mar 2005 5:46 PM
OpticTygre
Check out
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconcollectionssynchronizationthreadsafety.asp


Show quoteHide quote
"Shane Story" <shanesREMOVET***@dv-corp.com> wrote in message
news:eXWLzhhNFHA.3336@TK2MSFTNGP10.phx.gbl...
> The Collections.Queue class has a Synchronized property.
>
> My colleague was saying that this means that we can use the queue in a
> multi-threaded app and not worry about normal threading issues.
>
> Is this true, or is it a faulty assumption and would he still need to use
> Reader/Writer locks?
>
> Thanks,
>
> Shane
>
Author
31 Mar 2005 5:56 PM
Shane Story
thanks for the link...

So from what I read, it seems that if the queue returns another queue
through the synchronized method and you only use it, there are no problems.

Shane

Show quoteHide quote
"OpticTygre" <opticty***@adelphia.net> wrote in message
news:QMmdnWyrb_f9qtHfRVn-hg@adelphia.com...
> Check out
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconcollectionssynchronizationthreadsafety.asp
>
>
> "Shane Story" <shanesREMOVET***@dv-corp.com> wrote in message
> news:eXWLzhhNFHA.3336@TK2MSFTNGP10.phx.gbl...
>> The Collections.Queue class has a Synchronized property.
>>
>> My colleague was saying that this means that we can use the queue in a
>> multi-threaded app and not worry about normal threading issues.
>>
>> Is this true, or is it a faulty assumption and would he still need to use
>> Reader/Writer locks?
>>
>> Thanks,
>>
>> Shane
>>
>
>