-
Notifications
You must be signed in to change notification settings - Fork 417
Avoid re-using same job #2356
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
Avoid re-using same job #2356
Conversation
test this please |
@snjeza , I see a lot of places in the tests where we use the Is this change safe to do ? |
The part in createBuffer is not related to the intent of this change. I'll remove it. |
Modifying a running or just cancelled job is not always a safe operation. This can (does when integrated in Eclipse IDE) lead to IllegalStateException when calling getRule() on some already scheduled job. To prevent that, just create a new job when rules change.
a5077fa
to
58bf573
Compare
Done removing unrelated part of this PR. |
This comment was marked as outdated.
This comment was marked as outdated.
1 similar comment
re-test this please. |
@mickaelistria , just wondering, we re-use |
re-test this please. |
1 similar comment
re-test this please. |
@rgrunber It is copied from https://github.com/eclipse-jdt/eclipse.jdt.ui/blob/567c1546ee76fbbd4a50ee6b0de8e046a19356fe/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/DocumentAdapter.java |
Not with this one. |
Modifying a running or just cancelled job is not always a safe operation. This can (does when integrated in Eclipse IDE) lead to IllegalStateException when calling getRule() on some already scheduled job.
To prevent that, just create a new job when rules change.