提交 e311e59a 编写于 作者: B bpb

8172465: Better handling of channel groups

Reviewed-by: alanb, coffeys, skoivu, rhalade, chegar
上级 6ba258f7
/* /*
* Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -246,13 +246,16 @@ abstract class AsynchronousChannelGroupImpl ...@@ -246,13 +246,16 @@ abstract class AsynchronousChannelGroupImpl
abstract void shutdownHandlerTasks(); abstract void shutdownHandlerTasks();
private void shutdownExecutors() { private void shutdownExecutors() {
AccessController.doPrivileged(new PrivilegedAction<Void>() { AccessController.doPrivileged(
public Void run() { new PrivilegedAction<Void>() {
pool.executor().shutdown(); public Void run() {
timeoutExecutor.shutdown(); pool.executor().shutdown();
return null; timeoutExecutor.shutdown();
} return null;
}); }
},
null,
new RuntimePermission("modifyThread"));
} }
@Override @Override
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册