Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

The call can be inside the new thread to avoid crashing RLS if it fails #481

Merged
merged 1 commit into from
Sep 24, 2017
Merged

The call can be inside the new thread to avoid crashing RLS if it fails #481

merged 1 commit into from
Sep 24, 2017

Conversation

jonasbb
Copy link
Contributor

@jonasbb jonasbb commented Sep 16, 2017

No description provided.

@Xanewok
Copy link
Member

Xanewok commented Sep 16, 2017

For context: #181 (comment).

let analysis = ctx.analysis.clone();

let handle = thread::spawn(move || {
let type_id = analysis.id(&span).expect("Analysis: Getting typeid from span");
Copy link
Member

Choose a reason for hiding this comment

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

Could we use ? rather than expect here to return an error?

@jonasbb
Copy link
Contributor Author

jonasbb commented Sep 24, 2017

I didn't have much time this week, but now I updated the PR. @nrc

@nrc nrc merged commit 6396ef9 into rust-lang:master Sep 24, 2017
@nrc
Copy link
Member

nrc commented Sep 24, 2017

Thanks!

@jonasbb jonasbb deleted the avoid-crash branch November 11, 2017 14:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants