avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ram C" <ra...@mybc.com>
Subject BinaryHeap - syncronized methods?
Date Fri, 16 Mar 2001 07:26:12 GMT
Should the methods, pop(), insert(),peek() in BinaryHeap be syncronized

When used in the DefaultTimeScheduler, if different threads try to manipulate
the BinaryHeap(m_elements) with these different methods, we might endup
with some inconsistent state...

Any thoughts?

The current design of blocks seems to be very dependent on 'syncronized'
methods(or HashTable). I have heard syncronized methods can run as much
as '100' times slower than regular methods. But i have very little knowledge
on concurent programing to validate this..

For example, the object store block uses syncronized methods to write
and read objects. If i were to directly write the object instead of using
the 'objectstore' block, i don't need syncronized methods...Its not fair
for all the other threads to wait while one thread is writing a really
huge file(like a huge e-mail with attachements)..

Could this lead to scalability problems later?


FREE voicemail, email and fax, all in one place.  Sign Up Now! http://www.mybc.com

To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org

View raw message