java - Linked list problems on multithreaded program -


this 1 of homework questions:

what problems using linkedlist on multithreaded program, alternative?

i answered follows , appreciate other advices:

the problem lack of concurrency - in order use linked list have use lock on changes made internal objects holds relaible (since every object holds reference next object), once lock linked list 'shutting down' options use multiple threads, alternative array since can lock every item seperatly.

i'm totally not sure on answer, advices?...

your answer looks good.

alternatives copyonwritearraylist (assuming list suffices) if iterations far exceed mutations.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -