Well, in that case it’s a very good example! ![]()
I would say it’s not intended or desired, but also not unexpected, as to my understanding task scheduling (as well as IO for that matter) is one of the responsibilities of the operating system.
By the way, I also tested playtone(true) on a computer running Ubuntu, and can indeed notice some unresponsiveness there. In any case there’s no harm in adding a wait. Then your code would work on all platforms.