Course of Raku / Functional, concurrent, reactive, and web programming / Concurrent programming / Threads / Exercises

Join and wait

Problem

Start a thread that prints first. After joining it, print second, so that the two lines always appear in that order.

Example

The program prints:

first
second

Solution

See the solution

Course navigation

Solution: Run in a thread   |   Solution: Join and wait