Skip to content
This repository has been archived by the owner on Mar 6, 2018. It is now read-only.

ConcurrentModification as IOConnection.register() does not take a lock #15

Closed
EugenDueck opened this issue Jul 20, 2012 · 1 comment
Closed

Comments

@EugenDueck
Copy link

The for-loop
for (IOConnection connection : list)
in that method throws ConcurrentModificationExceptions, when I create hundreds of client instances (for benchmarking purposes).

I haven't yet familiarized myself with the codebase, but when I just put a
synchronized (connections)
around the full body of that method (which is maybe too coarse) it worked fine.

FYI: In cleanup(), you already synchronize on the connections object in order to access it

@Gottox
Copy link
Owner

Gottox commented Aug 6, 2012

Thanks, I applied your proposal.

@Gottox Gottox closed this as completed Aug 6, 2012
Gottox added a commit that referenced this issue Aug 6, 2012
Gottox added a commit that referenced this issue Oct 1, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants