Re: Question about synchronized



Chris Uppal wrote:
Thomas G. Marshall wrote:

John C. Bollinger wrote:

Yes.  You should think of synchronization as protecting sections of code
-- either blocks or methods -- not objects.

Yes! And where were you when I was getting railed on for making such a claim in september '04?


I also wondered if "John" is being spoofed, or possibly has been taken over by
mind-eating aliens ;-)

If I deny it will you believe me? :-)

For the record: /I/ am still me, and so am unchanged in my opinion that talking
of "protecting sections of code" is badly misleading...

It looks like I really stepped in it. I think, however, that this debate is more about terminology and personal mental models than it is about conflicting understanding among us (Chris, Thomas, and me) of how synchronization affects program behavior. The OP was clearly confused about the implications of objects having associated monitors, and at this point I predict that he will indeed have more success in understanding the behavior of multithreaded programs if he focuses his attention on which sections of his code need to be synchronized, on which monitor. I think in any case that he has taken the point, which is that locking an object's monitor does not prevent access to any unsynchronized part of any object's behavior.


--
John Bollinger
jobollin@xxxxxxxxxxx
.



Relevant Pages

  • where will you embark the elaborate continuing charters before Fahd does
    ... people listening into private conversations, ... How can the FBI use computers to monitor thousands and thousands ... And how did they get this CALEA legislation? ... Literally in the dark of night, without debate, it passed in the house ...
    (sci.crypt)
  • Re: A VOIR (SPAM !)
    ... How can the FBI use computers to monitor thousands and thousands ... The Digital Telephony Act will allow them to legally - at full ... Literally in the dark of night, without debate, it passed in the house ...
    (rec.skydiving)