|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Queue Thread Safe questionThe 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 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 > 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 >> > >
Visual Basic .Net List Box
Hiding items in base classes Problems with pictureboxes and memory usage detect mouse event on node of a treeview unbounded array of objects gets error when instantiating elements Adding the same file to multiple projects. How can I loop through all of the messages in the inbox - VB.NET E newbie stupidity: opening one form and closing another FTP client Array.Length vs Array.GetUpperBound(0) -- any real differences? |
|||||||||||||||||||||||