File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
visualvm/heapviewer/src/org/graalvm/visualvm/heapviewer/model Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -189,15 +189,17 @@ protected HeapViewerNode[] doInBackground() throws Exception {
189
189
return ret ;
190
190
}
191
191
protected void done () {
192
- if (children != null ) try {
193
- HeapViewerNode [] newChildren = get ();
194
- // newChildren may be null, for example if the worker thread has been interrupted
195
- if (newChildren != null ) {
196
- setChildren (newChildren );
197
- root .updateChildren (HeapViewerNode .this );
192
+ synchronized (HeapViewerNode .this ) {
193
+ if (currentWorker == null ) try {
194
+ HeapViewerNode [] newChildren = get ();
195
+ // newChildren may be null, for example if the worker thread has been interrupted
196
+ if (newChildren != null ) {
197
+ setChildren (newChildren );
198
+ root .updateChildren (HeapViewerNode .this );
199
+ }
200
+ } catch (Exception ex ) {
201
+ Exceptions .printStackTrace (ex );
198
202
}
199
- } catch (Exception ex ) {
200
- Exceptions .printStackTrace (ex );
201
203
}
202
204
}
203
205
};
You can’t perform that action at this time.
0 commit comments