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

fix: Race condition in the workerManager #3507

Merged
merged 3 commits into from
Jan 24, 2024
Merged

Conversation

bboure
Copy link
Contributor

@bboure bboure commented Jan 20, 2024

There was a race condition in the workerManager.

Which caused worker to be null here.

This happened when several GraphQL editors on different models were present. getLanguageServiceWorker() called very quickly several times.

The root cause was that here, this._client was still resolving (and therefore was null), but this._worker was present.

Copy link

changeset-bot bot commented Jan 20, 2024

🦋 Changeset detected

Latest commit: 00ec270

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
monaco-graphql Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@bboure bboure force-pushed the fix-workermanager branch from 06b77fe to c4930ae Compare January 20, 2024 09:29
@acao
Copy link
Member

acao commented Jan 24, 2024

@bboure thank you, good find!

@acao acao merged commit 7f05c10 into graphql:main Jan 24, 2024
12 checks passed
@acao acao mentioned this pull request Jan 24, 2024
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.

2 participants