Gerhard Froehlich wrote:
> Hi,
> 
> 
>>-----Original Message-----
>>From: Berin Loritsch [mailto:[EMAIL PROTECTED]]
>>Sent: Friday, February 15, 2002 9:41 PM
>>To: Avalon Developers List
>>Subject: Re: We desperately need an efficient threadsafe hashmap
>>
>>
>>Gerhard Froehlich wrote:
>>
>>>PS: I just implemented a size method in my class
>>>here.
>>>
>>>Interest?
>>>
>>I haven't run accross a need for size().
>>
> 
> Hmm you never know...for me it was just a exercise...
> 
> 
>>If you do, processing should be something like keySet()
>>
> 
> Hehe I did nearly the same impl. But without synchronized.
> Is this really needed?


You can run into issues when the bucket is changing while you are reading it.

size() should not be a frequently called operation--just like keySet()
is not a frequently called operation.  (It is only called on init and
shutdown).


-- 

"They that give up essential liberty to obtain a little temporary safety
  deserve neither liberty nor safety."
                 - Benjamin Franklin


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to