Skip to content

fix #88: use CopyOnWriteArrayList for thread-safe message list - #103

Open
elharo wants to merge 1 commit into
apache:masterfrom
elharo:fix-88-messageholder-sync
Open

fix #88: use CopyOnWriteArrayList for thread-safe message list#103
elharo wants to merge 1 commit into
apache:masterfrom
elharo:fix-88-messageholder-sync

Conversation

@elharo

@elharo elharo commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Change the messages list from ArrayList to CopyOnWriteArrayList to prevent ConcurrentModificationException under concurrent access.

Fixes #88

- Change the messages list from ArrayList to CopyOnWriteArrayList
- Add concurrency test for adding messages from multiple threads
@elharo
elharo marked this pull request as ready for review July 5, 2026 11:57
@elharo
elharo requested a review from khmarbaise July 5, 2026 11:58
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.

DefaultMessageHolder: unsynchronized ArrayList access in multi-threaded environment

1 participant