eclipse-platform / eclipse-platform/eclipse.platform
Few WorkManager fields are not MT safe
Open
bug
- Dominant language
- Java
- Stars
- 165
- Forks
- 174
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 22
Description
While debugging https://github.com/eclipse-jdt/eclipse.jdt.core/issues/4370 I've noticed that in the `org.eclipse.core.internal.resources.WorkManager` few fields are not volatile/atomic but could be accessed from different threads, so even if the modification happens while holding workspace locks, other threads might see stale values.
Fields in question are
- `WorkManager.operationCanceled`
- `WorkManager.nestedOperations`
- `WorkManager.preparedOperations`
I don't have reproducer, but I think making the fields either volatile or atomic shouldn't harm.
Contributor guide
Assessment
This issue has not been assessed yet.