Skip to content

Commit 8c2e850

Browse files
committed
Fixed ExecutorsCreate example
- added missed Thread.sleep(500) to ExecutorsCreate example to wait until log message is being printed in console.
1 parent 969c519 commit 8c2e850

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/scala/org/learningconcurrency/ch3/Executors.scala

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ object ExecutorsCreate extends App {
1212
executor.execute(new Runnable {
1313
def run() = log("This task is run asynchronously.")
1414
})
15+
16+
Thread.sleep(500)
1517
}
1618

1719

0 commit comments

Comments
 (0)