Skip to content

Add manual stop on schema diffing algorithm#3119

Merged
andimarek merged 5 commits intographql-java:masterfrom
gnawf:add-diffing-stopper
Mar 20, 2023
Merged

Add manual stop on schema diffing algorithm#3119
andimarek merged 5 commits intographql-java:masterfrom
gnawf:add-diffing-stopper

Conversation

@gnawf
Copy link
Copy Markdown
Contributor

@gnawf gnawf commented Mar 16, 2023

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

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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