File tree 3 files changed +13
-10
lines changed
app/src/processing/app/debug
3 files changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -401,10 +401,8 @@ private void execAsynchronously(List commandList) throws RunnerException {
401
401
boolean compiling = true ;
402
402
while (compiling ) {
403
403
try {
404
- if (in .thread != null )
405
- in .thread .join ();
406
- if (err .thread != null )
407
- err .thread .join ();
404
+ in .join ();
405
+ err .join ();
408
406
result = process .waitFor ();
409
407
//System.out.println("result is " + result);
410
408
compiling = false ;
Original file line number Diff line number Diff line change @@ -85,8 +85,15 @@ public void run() {
85
85
}
86
86
}
87
87
88
-
88
+ // Wait until the MessageSiphon thread is complete.
89
+ public void join () throws java .lang .InterruptedException {
90
+ // Grab a temp copy in case another thread nulls the "thread"
91
+ // member variable
92
+ Thread t = thread ;
93
+ if (t != null ) t .join ();
94
+ }
95
+
89
96
public Thread getThread () {
90
97
return thread ;
91
- }
98
+ }
92
99
}
Original file line number Diff line number Diff line change @@ -63,10 +63,8 @@ public long computeSize() throws RunnerException {
63
63
64
64
while (running ) {
65
65
try {
66
- if (in .thread != null )
67
- in .thread .join ();
68
- if (err .thread != null )
69
- err .thread .join ();
66
+ in .join ();
67
+ err .join ();
70
68
r = process .waitFor ();
71
69
running = false ;
72
70
} catch (InterruptedException intExc ) { }
You can’t perform that action at this time.
0 commit comments