Problem 1115 · Medium
Two threads print foo and bar alternately n times, using two permits that hand control back and forth.
Open the interactive visualisation