KEMBAR78
Add manual stop on schema diffing algorithm by gnawf · Pull Request #3119 · graphql-java/graphql-java · GitHub
Skip to content

Conversation

@gnawf
Copy link
Contributor

@gnawf gnawf commented Mar 16, 2023

Adds .stop() function to SchemaDiffing.java and also checks for Thread.interrupted()

Copy link
Member

@andimarek andimarek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets not check the Thread flag at all and only use the provided boolean.

Also: mark all new classes as @Internal

@@ -0,0 +1,7 @@
package graphql.schema.diffing;

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets make this Internal

private final AtomicBoolean wasStopped = new AtomicBoolean(false);

void check() {
if (Thread.interrupted()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets use only the boolean flag

@andimarek andimarek added this pull request to the merge queue Mar 20, 2023
@andimarek andimarek added this to the 20.1 milestone Mar 20, 2023
@andimarek andimarek merged commit 4b4c0e7 into graphql-java:master Mar 20, 2023
@andimarek andimarek changed the title Add manual stop on algorithm Add manual stop on schema diffing algorithm Mar 20, 2023
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.

3 participants