Skip to content

Why ISourceGenerator is not async? #49157

Discussion options

You must be logged in to vote

They are called synchronously, but in contexts where they may be canceled. For example, in the IDE this work will get kicked off. It's synchronous because we don't want the overhead of async calls in code that we don't want to virally become async. But it cancelable because if we don't need the results anymore, we want to cancel it to free up resources for other work we'r edoing.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by dominikjeske
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants