Skip to content

Simplify server reloading logic #3164

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

Closed
matklad opened this issue Feb 16, 2020 · 3 comments · Fixed by #3190
Closed

Simplify server reloading logic #3164

matklad opened this issue Feb 16, 2020 · 3 comments · Fixed by #3190

Comments

@matklad
Copy link
Member

matklad commented Feb 16, 2020

microsoft/vscode#45774 (comment) <- seems much neater way then what we are doing

@Veetaha
Copy link
Contributor

Veetaha commented Feb 16, 2020

Yeah, this was my initial proposal, though you gave an argument that we don't cancel inflight requests (already scheduled microtasks that hold a reference to terminated language client).
The ideal way to deal with this would be to pass cancellation tokens to our handlers, but this way don't you think this would be too much code that deals with a very rare problem?
Also, see my additional investigation in comments under my initial proposal.

@Veetaha
Copy link
Contributor

Veetaha commented Feb 16, 2020

One way to better employ the solution you referenced here with more confidence is to await for the resolution of all microtasks before restarting the server...

@Veetaha
Copy link
Contributor

Veetaha commented Feb 16, 2020

FYI: as an example of flushing microtasks implementation we can refer to this implementation in jest testing framework that is added in testing-library/react-testing-library#440

matklad added a commit to matklad/rust-analyzer that referenced this issue Feb 17, 2020
bors bot added a commit that referenced this issue Feb 17, 2020
3190: Simplify TS reload logic r=matklad a=matklad

Fixes #3164

Co-authored-by: Aleksey Kladov <[email protected]>
bors bot added a commit that referenced this issue Feb 17, 2020
3190: Simplify TS reload logic r=matklad a=matklad

Fixes #3164

Co-authored-by: Aleksey Kladov <[email protected]>
matklad added a commit to matklad/rust-analyzer that referenced this issue Feb 17, 2020
bors bot added a commit that referenced this issue Feb 17, 2020
3190: Simplify TS reload logic r=matklad a=matklad

Fixes #3164

Co-authored-by: Aleksey Kladov <[email protected]>
cjhopman pushed a commit to cjhopman/rust-analyzer that referenced this issue Apr 10, 2020
lnicola pushed a commit to lnicola/rust-analyzer that referenced this issue Apr 7, 2024
freebsd adding getrandom interception.

note that os support was added in same time as getentropy.
RalfJung pushed a commit to RalfJung/rust-analyzer that referenced this issue Apr 27, 2024
freebsd adding getrandom interception.

note that os support was added in same time as getentropy.
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 a pull request may close this issue.

2 participants