Skip to content

Cancel FSI interactions via FCS net7? #14489

Closed
@goswinr

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 ?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions