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

refactor: replace setTimeout with setImmediate #234

Merged
merged 2 commits into from
Aug 28, 2024

Conversation

nieyuyao
Copy link
Contributor

@nieyuyao nieyuyao commented Aug 28, 2024

As mentioned in the comment, it seems more reasonable to replace setTimeout with setImmediate.

  1. volar uses vscode-languageserver-node, which uses setImmediate to process messages.
  2. the built-in HTML plugin of vscode also uses setImmediate to wrap the runner.
  3. this ensures the order of message processing.

🤔

@nieyuyao nieyuyao changed the title fix: replace setTimeout with setImmediate refactor: replace setTimeout with setImmediate Aug 28, 2024
@nieyuyao nieyuyao marked this pull request as draft August 28, 2024 02:37
@nieyuyao nieyuyao marked this pull request as ready for review August 28, 2024 11:43
Copy link

pkg-pr-new bot commented Aug 28, 2024

commit: cae1a7b

@volar/eslint

pnpm add https://pkg.pr.new/volarjs/volar.js/@volar/eslint@234

@volar/jsdelivr

pnpm add https://pkg.pr.new/volarjs/volar.js/@volar/jsdelivr@234

@volar/kit

pnpm add https://pkg.pr.new/volarjs/volar.js/@volar/kit@234

@volar/language-core

pnpm add https://pkg.pr.new/volarjs/volar.js/@volar/language-core@234

@volar/language-server

pnpm add https://pkg.pr.new/volarjs/volar.js/@volar/language-server@234

@volar/language-service

pnpm add https://pkg.pr.new/volarjs/volar.js/@volar/language-service@234

@volar/monaco

pnpm add https://pkg.pr.new/volarjs/volar.js/@volar/monaco@234

@volar/source-map

pnpm add https://pkg.pr.new/volarjs/volar.js/@volar/source-map@234

@volar/test-utils

pnpm add https://pkg.pr.new/volarjs/volar.js/@volar/test-utils@234

@volar/typescript

pnpm add https://pkg.pr.new/volarjs/volar.js/@volar/typescript@234

@volar/vscode

pnpm add https://pkg.pr.new/volarjs/volar.js/@volar/vscode@234

Open in Stackblitz

@johnsoncodehk
Copy link
Member

Just made some changes to fix browser compatibility. Thanks!

@johnsoncodehk johnsoncodehk merged commit ff042b8 into volarjs:master Aug 28, 2024
5 checks passed
@nieyuyao nieyuyao deleted the refactor/worker-async branch September 2, 2024 02:00
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