-
Notifications
You must be signed in to change notification settings - Fork 794
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
Non-cancellable metadata access when importing a DLL #18235
Comments
Just from reading the code I guess the problem is here fsharp/src/Compiler/Driver/CompilerImports.fs Lines 2251 to 2257 in b2f2065
Despite what the comment says, this is async , not cancellable
To propagate the cancellation token the call to |
Yes, the thing is, fsharp/src/Compiler/AbstractIL/ilread.fsi Lines 62 to 66 in b2f2065
|
Hm, but there are many APIs that aren't themself aware of possible cancellations, and it's fine. What's important is their calls are wrapped in the cancellable computation somewhere. |
True, but relying on convention over explicit type contract in public api makes me feel uneasy 😄. I looked through the code and I can see a few other potentially problematic places where |
True, but I also think we don't want to change the entire IL subsystem to annotate everything as cancellable explicitly. |
Makes sense :) I'm wondering what to wrap in cancellable to make a reasonably seamless fix. |
Could we treat everything async around CompilerImports as being a cancellable? |
We could maybe use some resumable AsyncEx flavor internally throughout and only keep legacy async on public endpoints. |
And this is the stack from the debugger:
@majocha Could that be of interest for you? 🙂
The text was updated successfully, but these errors were encountered: