JRE-382 Three AWT-tests become hanging starting since master-875

(cherry picked from commit 7d492101db8fcbb3d285fd8e9669f74b0e0fce8f)
(cherry picked from commit b965f85c1b)
(cherry picked from commit 5b61c2f72a)
This commit is contained in:
Anton Tarasov
2017-05-31 12:12:35 +03:00
committed by jbrbot
parent e18c224281
commit 6f232ff83d

View File

@@ -730,7 +730,16 @@ public final class LWCToolkit extends LWToolkit {
executor = new ThreadPoolExecutor(1, Integer.MAX_VALUE,
60L, TimeUnit.SECONDS,
new SynchronousQueue<>(),
Executors.privilegedThreadFactory());
new ThreadFactory() {
private ThreadFactory factory = Executors.privilegedThreadFactory();
@Override
public Thread newThread(Runnable r) {
Thread t = factory.newThread(r);
t.setDaemon(true);
t.setName("AWT-SelectorPerformer " + t.getName());
return t;
}
});
}
LinkedBlockingQueue<InvocationEvent> currentQueue;
synchronized (invocations) {