synclock on queue properties?

  • Thread starter Thread starter Keith Langer
  • Start date Start date
K

Keith Langer

Is it necessary to do a synclock when checking the message count of a
shared queue object?
 
Keith,
I think it really depends on how the Count Property it implemented. If the
queue has a underlying backing field for the count that the Count Property
returns, then I would say yes. However if the queue physically counts the
items, then I would say no.

However as Brian stated, I don't think you should have to.

Hope this helps
Jay
 
Jim,
I hope you realize my statement was for properties in general and not the
Queue property specifically!

Thank you for pointing that out!

Jay

Jim Shoo said:
According to the help files ALL OPERATIONS on a Queue should be synchronized.


"Jay B. Harlow [MVP - Outlook]" <[email protected]> wrote in message
Keith,
I think it really depends on how the Count Property it implemented. If the
queue has a underlying backing field for the count that the Count Property
returns, then I would say yes. However if the queue physically counts the
items, then I would say no.

However as Brian stated, I don't think you should have to.

Hope this helps
Jay
 
Back
Top