Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
0ef5fd0a
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
0ef5fd0a
编写于
11月 05, 2010
作者:
C
chegar
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6988618: JCK test setDaemon0101 hangs on specific machine
Reviewed-by: dholmes, alanb
上级
ddd2c643
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
21 addition
and
19 deletion
+21
-19
src/share/classes/java/lang/Thread.java
src/share/classes/java/lang/Thread.java
+8
-5
src/share/classes/java/lang/ThreadGroup.java
src/share/classes/java/lang/ThreadGroup.java
+13
-14
未找到文件。
src/share/classes/java/lang/Thread.java
浏览文件 @
0ef5fd0a
...
...
@@ -229,7 +229,7 @@ class Thread implements Runnable {
* after setting this thread's interrupt status.
*/
private
volatile
Interruptible
blocker
;
private
Object
blockerLock
=
new
Object
();
private
final
Object
blockerLock
=
new
Object
();
/* Set the blocker field; invoked via sun.misc.SharedSecrets from java.nio code
*/
...
...
@@ -688,16 +688,19 @@ class Thread implements Runnable {
throw
new
IllegalThreadStateException
();
/* Notify the group that this thread is about to be started
* so that it can be added to the group's list of threads. */
* so that it can be added to the group's list of threads
* and the group's unstarted count can be decremented. */
group
.
threadStarting
(
this
);
boolean
failed
=
tru
e
;
boolean
started
=
fals
e
;
try
{
start0
();
failed
=
fals
e
;
started
=
tru
e
;
}
finally
{
try
{
group
.
threadStarted
(
this
,
failed
);
if
(!
started
)
{
group
.
threadStartFailed
(
this
);
}
}
catch
(
Throwable
ignore
)
{
/* do nothing. If start0 threw a Throwable then
it will be passed up the call stack */
...
...
src/share/classes/java/lang/ThreadGroup.java
浏览文件 @
0ef5fd0a
...
...
@@ -870,9 +870,16 @@ class ThreadGroup implements Thread.UncaughtExceptionHandler {
/**
* Notifies the group that the thread {@code t} is about to be
* started and adds the thread to this thread group.
*
* The thread is now a fully fledged member of the group, even though
* it hasn't been started yet. It will prevent the group from being
* destroyed so the unstarted Threads count is decremented.
*/
void
threadStarting
(
Thread
t
)
{
add
(
t
);
synchronized
(
this
)
{
add
(
t
);
nUnstartedThreads
--;
}
}
/**
...
...
@@ -907,12 +914,10 @@ class ThreadGroup implements Thread.UncaughtExceptionHandler {
}
/**
* Notifies the group that the thread {@code t} has
complet
ed
* Notifies the group that the thread {@code t} has
fail
ed
* an attempt to start.
*
* <p> If the thread has been started successfully
* then the group has its unstarted Threads count decremented.
* Otherwise the state of this thread group is rolled back as if the
* <p> The state of this thread group is rolled back as if the
* attempt to start the thread has never occurred. The thread is again
* considered an unstarted member of the thread group, and a subsequent
* attempt to start the thread is permitted.
...
...
@@ -923,16 +928,10 @@ class ThreadGroup implements Thread.UncaughtExceptionHandler {
* @param failed
* true if the thread could not be started successfully
*/
void
threadStart
ed
(
Thread
t
,
boolean
failed
)
{
void
threadStart
Failed
(
Thread
t
)
{
synchronized
(
this
)
{
if
(
failed
)
{
remove
(
t
);
}
else
{
if
(
destroyed
)
{
return
;
}
nUnstartedThreads
--;
}
remove
(
t
);
nUnstartedThreads
++;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录