---- Peter Donald <[EMAIL PROTECTED]> wrote:
> At 11:26 15/3/01 -0800, Ram C wrote:
> >Should the methods, pop(), insert(),peek() in BinaryHeap be syncronized
> >?
>
> Possibly - though I would prefer if they were unsynchronized by default
> but
> you could make them synchronized like
>
> PriorityQueue pq = new SynchronizedPriorityQueue( new BinaryHeap()
> );
I can create a new SynchronizedPriorityQueue(or should it be SyncronizedBinaryHeap
???) which implements PriorityQueue, and calls all the BinaryHeap methods
using syncronized wrapper methods.
>
> or perhaps
>
> PriorityQueue pq = AvalonCollections.synchronize( new BinaryHeap()
> );
>
I don't understand this...How would this synchronization work? I can
see you want to create a static method 'synchronize' in AvalonCollections.
sorry i'm new to these kind of stuff...so please pardon my ignorance.
Thanks,
Ram.
___________________________________________________________
FREE voicemail, email and fax, all in one place. Sign Up Now! http://www.mybc.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]