File tree 1 file changed +4
-2
lines changed
scalafix-rules/src/main/scala/scala/tools/nsc/interactive
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package scala.tools.nsc.interactive
2
2
3
3
import java .util .logging .Level
4
4
5
+ import scala .tools .nsc .util .WorkScheduler
5
6
import scala .util .control .NonFatal
6
7
7
8
import scala .meta .internal .pc .ScalafixGlobal
@@ -29,8 +30,8 @@ trait ScalafixGlobalProxy { this: ScalafixGlobal =>
29
30
private def newRunnerThread (): Thread = {
30
31
if (compileRunner.isAlive) {
31
32
try {
32
- val re = askForResponse(() => throw ShutdownReq )
33
- re.get
33
+ this .askShutdown( )
34
+ while (compileRunner.isAlive) Thread .sleep( 0 )
34
35
} catch {
35
36
case NonFatal (e) =>
36
37
println(
@@ -40,6 +41,7 @@ trait ScalafixGlobalProxy { this: ScalafixGlobal =>
40
41
)
41
42
}
42
43
}
44
+ this .scheduler = new WorkScheduler
43
45
compileRunner = new ScalafixGlobalThread (this , " Metals" )
44
46
compileRunner.setDaemon(true )
45
47
compileRunner.start()
You can’t perform that action at this time.
0 commit comments