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

Ditching some ugly thread statics #670

Merged
merged 3 commits into from
May 23, 2022
Merged

Ditching some ugly thread statics #670

merged 3 commits into from
May 23, 2022

Conversation

belav
Copy link
Owner

@belav belav commented May 21, 2022

No description provided.

shocklateboy92
shocklateboy92 previously approved these changes May 22, 2022
Copy link
Collaborator

@shocklateboy92 shocklateboy92 left a comment

Choose a reason for hiding this comment

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

I didn't read through #663, but I'm going to assume this class will be available everywhere now.

Also, we only do 1 formatting job per thread, right? This class will never need to be thread-safe/re-entrant?

@@ -1,3 +1,8 @@
namespace CSharpier.SyntaxPrinter;

public class FormattingContext { }
Copy link
Collaborator

Choose a reason for hiding this comment

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

Note: you should consider making this a record, since it's probably never going to have methods on it.

@belav
Copy link
Owner Author

belav commented May 23, 2022

I didn't read through #663, but I'm going to assume this class will be available everywhere now.

Basically yeah. It gets passed through almost all of the print methods.

Also, we only do 1 formatting job per thread, right? This class will never need to be thread-safe/re-entrant?

That's correct

@belav belav merged commit 36c8b86 into master May 23, 2022
@belav belav deleted the ditchthreadstatic branch May 23, 2022 15:29
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