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

Synchronize everything in Transcript #236

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

csw
Copy link

@csw csw commented Sep 12, 2019

A long-standing concurrency bug (#157) was causing get5primeUtrs() to throw ConcurrentModificationException in multithreaded mode. Running with large numbers of cores (96, for instance) exacerbated the problem.

A Transcript was being shared between threads, and they were concurrently modifying the utrs member. This change makes all methods synchronized to prevent concurrent use of any of the internals. That might be more synchronization than absolutely necessary, but it
appears to solve the problem without a dramatic performance penalty.

A long-standing concurrency bug (pcingola#157) was causing
get5primeUtrs() to throw ConcurrentModificationException in
multithreaded mode. Running with large numbers of cores (96, for
instance) exacerbated the problem.

A Transcript was being shared between threads, and they were
concurrently modifying the utrs member. This change makes all methods
synchronized to prevent concurrent use of any of the internals. That
might be more synchronization than absolutely necessary, but it
appears to solve the problem without a dramatic performance penalty.
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.

1 participant