提交 18dee73f authored 作者: Noel Grandin's avatar Noel Grandin

another attempt to fix test failure in TestRunScript

where we are calling getException() and seeing a null value.
Because we access these without synchronization, we need to use volatile.
上级 28bd6252
......@@ -23,13 +23,13 @@ public abstract class Task implements Runnable {
/**
* The result, if any.
*/
protected Object result;
private volatile Object result;
private volatile boolean finished;
private Thread thread;
private Exception ex;
private volatile Exception ex;
/**
* The method to be implemented.
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论