Skip to content

Commit

Permalink
Update (fixed busy waiting in point 2)
Browse files Browse the repository at this point in the history
  • Loading branch information
TevaTavo committed Dec 7, 2024
1 parent f67310b commit f4c4f4b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion twin/src/main/java/com/iluwatar/twin/BallThread.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
* This class is a UI thread for drawing the {@link BallItem}, and provides methods for suspend
* and resume. It holds the reference of {@link BallItem} to delegate the draw task.
*/

@Slf4j
public class BallThread extends Thread {

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

/**
* Constructor.
*
* @param twin the BallItem instance
*/
public BallThread(BallItem twin) {
this.twin = twin;
}
Expand Down

0 comments on commit f4c4f4b

Please sign in to comment.