-
Notifications
You must be signed in to change notification settings - Fork 48
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
ConcurrentModificationException in Sentry.currentBreadcrumbs #110
Comments
Hi @fab1an - Sorry about the crash. I'll take a look into this today. |
Great thank you. Maybe you can leverage a Or better just sychronized the access with a ReadWriteLock. |
Do you need help on this? |
@marcomorain I think the It's probably easiest to use a ReadWriteLock: https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/locks/ReentrantReadWriteLock.html private final ReentrantReadWriteLock breadcrumbLock = ReentrantReadWriteLock() When reading the list wrap it like this: try {
breadcrumbLock.readLock().lock()
...use or copy the list ...
} finally {
breadcrumbLock.readLock().unlock()
} When writing: try {
breadcrumbLock.writeLock().lock()
...modify the list...
} finally {
breadcrumbLock.writeLock().unlock()
} |
Addresses #110 Add a ReadWriteLock to protect access to the breadcrumbs array
Addresses #110 Add a ReadWriteLock to protect access to the breadcrumbs array
Addresses #110 Add a ReadWriteLock to protect access to the breadcrumbs array
Addresses #110 Add a ReadWriteLock to protect access to the breadcrumbs array
Addresses #110 Add a ReadWriteLock to protect access to the breadcrumbs array
Addresses #110 Add a ReadWriteLock to protect access to the breadcrumbs array
I'm getting this error now and then:
captureFailedRetrofitResponse
looks just like this:The text was updated successfully, but these errors were encountered: