Skip to content

Commit

Permalink
Review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
auduchinok committed Feb 10, 2025
1 parent 7f3929e commit 9c96524
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 6 additions & 2 deletions src/Compiler/Driver/CompilerImports.fs
Original file line number Diff line number Diff line change
Expand Up @@ -2255,7 +2255,6 @@ and [<Sealed>] TcImports
r: AssemblyResolution
) : Async<(_ * (unit -> AvailableImportedAssembly list)) option> =
async {
use! _holder = Cancellable.UseToken()
CheckDisposed()
let m = r.originalReference.Range
let fileName = r.resolvedPath
Expand Down Expand Up @@ -2325,8 +2324,9 @@ and [<Sealed>] TcImports
// NOTE: When used in the Language Service this can cause the transitive checking of projects. Hence it must be cancellable.
member tcImports.RegisterAndImportReferencedAssemblies(ctok, nms: AssemblyResolution list) =
async {
CheckDisposed()
use! _holder = Cancellable.UseToken()

CheckDisposed()

let tcConfig = tcConfigP.Get ctok

Expand Down Expand Up @@ -2475,6 +2475,8 @@ and [<Sealed>] TcImports
// If a framework set ever includes type providers, you will not have to worry about explicitly calling Dispose as the Finalizer will handle it.
static member BuildFrameworkTcImports(tcConfigP: TcConfigProvider, frameworkDLLs, nonFrameworkDLLs) =
async {
use! _holder = Cancellable.UseToken()

let ctok = CompilationThreadToken()
let tcConfig = tcConfigP.Get ctok

Expand Down Expand Up @@ -2648,6 +2650,8 @@ and [<Sealed>] TcImports
) =

async {
use! _holder = Cancellable.UseToken()

let ctok = CompilationThreadToken()
let tcConfig = tcConfigP.Get ctok

Expand Down
4 changes: 0 additions & 4 deletions src/Compiler/Service/TransparentCompiler.fs
Original file line number Diff line number Diff line change
Expand Up @@ -611,8 +611,6 @@ type internal TransparentCompiler
caches.FrameworkImports.Get(
key,
async {
use! _holder = Cancellable.UseToken()

use _ = Activity.start "ComputeFrameworkImports" []
let tcConfigP = TcConfigProvider.Constant tcConfig

Expand All @@ -637,8 +635,6 @@ type internal TransparentCompiler
) =

async {
use! _holder = Cancellable.UseToken()

let diagnosticsLogger =
CompilationDiagnosticLogger("CombineImportedAssembliesTask", tcConfig.diagnosticsOptions)

Expand Down

0 comments on commit 9c96524

Please sign in to comment.