Is it good programming style to use:
Set s = Collections.synchronizedSet(new HashSet());
instead of using synchronized methods where objects are inserted and removed.
Are there any drawbacks to this? Is it slower? Bad coding style?
Printable View
Is it good programming style to use:
Set s = Collections.synchronizedSet(new HashSet());
instead of using synchronized methods where objects are inserted and removed.
Are there any drawbacks to this? Is it slower? Bad coding style?
How do I create a sync:ed LinkedList?
This doesnt work:
LinkedList mylist=Collections.synchronizedList(new LinkedList());