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

Sync when locked object is indirect via method call #8

Open
andrecostea opened this issue Aug 14, 2020 · 0 comments
Open

Sync when locked object is indirect via method call #8

andrecostea opened this issue Aug 14, 2020 · 0 comments

Comments

@andrecostea
Copy link
Collaborator

src/test/java/alarmclock/AlarmClock.java:191: warning: Thread Safety Violation 2
Read/Write race. Non-private method Monitor.wakeme(...) indirectly reads without synchronization from this.waitList.list.[_]. Potentially races with write in method Monitor.tick().
Reporting because this access may occur on a background thread.
189. */
190. try {
191. > synchronized (waitList.getLock(waketime)) {
192. try {
193. waitList.getLock(waketime).wait();

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

No branches or pull requests

1 participant