Seconded. Although I think Thread::yield should do what it says on the tin in the case of lightweight threads and it's hard to understand why they chose to not make it so, I don't care much. If the only problem I have to anticipate to get the full benefit of a well behaved lightweight threat scheduling is strategically sprinkling yield points inside those few tight loops that might actually threaten to hog a core then it's a net win.
Thinking about this further, a pragmatic enhancement to Thread::yield might look like this:
enum Hint {
ALWAYS,
FREQUENT,
SOMETIMES,
INFREQUENT,
NEVER
}
Thread::yield(Hint);
The method could be intrinsic to the compiler+runtime to provide runtime optimization (loop unrolling, tuning, etc.) of the 2nd - 4th cases. This would neatly avoid the need to:
long n = 0;
while (true) {
// stuff
if (++n > SOME_LIMIT) {
n = 0;
// yield here
}
}
It's neither. The frequency of non-blocking CPU bound sections of most applications is low and so the need to introduce scheduling hints is also infrequent. Aside from an endless, non-blocking loop that never yields omitting possibly beneficial yield points isn't an error; scheduling will not be ideal but the process will ultimately produce the same result.
In Australia we can tightly control our population growth via immigration so we don't need to encourage people to have kids. Kids are essentially considered a lifestyle choice and it's expected that their parents fund that lifestyle.
As per another comment, I’m unsure why you cut off at 12 years old.
That said, the role of schools in child care is often overlooked for the less economically measurable benefits of education. Without the child care provided by schools, many parents could not afford to work in developed nations. So dropping the age kids can go to school may be worth while.
Another area of school/childcare/education is the long holidays kids get. Malcolm Gladwell’s book, Outliers discusses the spurious origins of long school vacations.
Note, my wife is a high school science teacher and agrees with Gladwell’s hypothesis that long school holidays disadvantage poorer kids.