Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ConcurrentModificationException when user supplied Executor has more than 1 thread #109

Closed
wants to merge 1 commit into from

Conversation

jnj
Copy link

@jnj jnj commented Dec 14, 2012

The stale connection management assumes that its internal map will be accessed by only one thread at a time. But this is not always true; a user can provide an Executor that is backed by a thread pool. This synchronizes around the map put/remove to prevent ConcurrentModificationExceptions.

@pk11
Copy link
Contributor

pk11 commented Feb 27, 2013

since webbit is single-threaded by design I believe it's assumed that the user supplied executor provides only a single thread as well. Please see https://groups.google.com/d/msg/webbit/Vr_MN9CwNsA/oaiidfkNv6wJ and https://github.com/webbit/webbit/blob/master/src/main/java/org/webbitserver/WebServers.java#L22 for more information.

@aslakhellesoy
Copy link
Member

@pk11 that's correct. Webbit is not designed to work correctly when used with a multi-threaded executor, so this change is not necessary.

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.

3 participants