Corso di Raku / Programmazione funzionale, concorrente, reattiva e web / Programmazione concorrente / Thread / Exercises

Unite e attendete

Problema

Avvia un thread che stampa first. Dopo averlo unito, stampa second, così che le due righe compaiano sempre in quest’ordine.

Esempio

Il programma stampa:

first
second

Soluzione

Vedi la soluzione

Soluzione: Eseguite in un thread   |   Soluzione: Unite e attendete