File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
graalpython/com.oracle.graal.python/src/com/oracle/graal/python/runtime Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 44
44
import java .util .concurrent .ConcurrentLinkedQueue ;
45
45
import java .util .concurrent .Executors ;
46
46
import java .util .concurrent .ScheduledExecutorService ;
47
+ import java .util .concurrent .ThreadFactory ;
47
48
import java .util .concurrent .TimeUnit ;
48
49
import java .util .concurrent .locks .Lock ;
49
50
import java .util .concurrent .locks .ReentrantLock ;
@@ -91,7 +92,13 @@ default int frameIndex() {
91
92
}
92
93
}
93
94
94
- private final ScheduledExecutorService executorService = Executors .newScheduledThreadPool (2 );
95
+ private final ScheduledExecutorService executorService = Executors .newScheduledThreadPool (2 , new ThreadFactory () {
96
+ public Thread newThread (Runnable r ) {
97
+ Thread t = Executors .defaultThreadFactory ().newThread (r );
98
+ t .setDaemon (true );
99
+ return t ;
100
+ }
101
+ });
95
102
private final ConcurrentLinkedQueue <AsyncAction > scheduledActions = new ConcurrentLinkedQueue <>();
96
103
private boolean hasScheduledAction = false ;
97
104
private final Lock executingScheduledActions = new ReentrantLock ();
You can’t perform that action at this time.
0 commit comments