Skip to content

Cancel FSI interactions via FCS net7? #14489

Closed

Description

@goswinr

How to cancel FSI interactions in net7 ?
The new internal ControlledExecution.fs class seems to work well in VS for cancelling.
But I have not found a public member that exposes it to the FCS.
The cancelation token passed in via fsiSession.EvalInteraction(code,token) only seems to reach till here:

let rec ExecuteParsedInteractionInGroups (ctok, istate, synInteraction, diagnosticsLogger: DiagnosticsLogger, lastResult: FsiValue option, cancellationToken: CancellationToken) =

I could not use it successfully.

Does it reach all the way to ControlledExecution.fs ? This class seems to have its own token. TryAbort:

member _.TryAbort(): unit =

I also tried to run my own ControlledExecution Class
but got the message Compiler Error:input.fsx (1,1)-(1,1) interactive error internal error: The thread is already executing the ControlledExecution.Run method.
Did I miss something ? Or is the token in the Eval method suposed to work and I might be using it wrongly ?

Activity

  1. added this to the Backlog milestone on Dec 18, 2022
  2. locked and limited conversation to collaborators on Dec 19, 2022
  3. converted this issue into a discussion #14491 on Dec 19, 2022
  4. Repository owner moved this from Not Planned to Done in F# Compiler and Toolingon Dec 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions