Skip to content

Conversation

@buriedpot
Copy link

Issue #2024

@StevenArzt
Copy link
Contributor

Your merge request seems inconsistent with the issue #2024. The synchronization will only help in a multithreaded context, and only if the other operations that modify the collection are also synchronized. I don't see that this is the case. I rather assume that the overhead introduced by the synchronization fixes some weird timing issue by chance. If that's correct, the problem remains. Further, everyone pays for the overhead of synchronization. In total, I'm not really happy with this fix suggestion.

@buriedpot
Copy link
Author

Can you review my newest commit fb376b8, thank you!

@buriedpot
Copy link
Author

Your merge request seems inconsistent with the issue #2024. The synchronization will only help in a multithreaded context, and only if the other operations that modify the collection are also synchronized. I don't see that this is the case. I rather assume that the overhead introduced by the synchronization fixes some weird timing issue by chance. If that's correct, the problem remains. Further, everyone pays for the overhead of synchronization. In total, I'm not really happy with this fix suggestion.

Can you review my newest commit fb376b8, thank you!

Can you review my newest commit fb376b8, thank you!

@StevenArzt
Copy link
Contributor

The copy constructor internally just iterates over the incoming list. You can just have the ConcurrentModificationException inside the constructor if you're unlucky. A real fix would need to make the data structures concurrent, which is a major undertaking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants