Skip to content

Commit f4c4f4b

Browse files
committed
Update (fixed busy waiting in point 2)
1 parent f67310b commit f4c4f4b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

twin/src/main/java/com/iluwatar/twin/BallThread.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
* This class is a UI thread for drawing the {@link BallItem}, and provides methods for suspend
3333
* and resume. It holds the reference of {@link BallItem} to delegate the draw task.
3434
*/
35-
3635
@Slf4j
3736
public class BallThread extends Thread {
3837

@@ -43,6 +42,11 @@ public class BallThread extends Thread {
4342
private final Object lock = new Object();
4443
private final BallItem twin;
4544

45+
/**
46+
* Constructor.
47+
*
48+
* @param twin the BallItem instance
49+
*/
4650
public BallThread(BallItem twin) {
4751
this.twin = twin;
4852
}

0 commit comments

Comments
 (0)