Hi all,
could anybody help me to understand more about priorities? I've created the code that follows hoping the
Thread("C") with higher priority among the other 2 threads to finish before all others.
but analyzing the output, I can't get it. I read on K&B book that I cannot rely on thread priorities, but I think setting priorities at so much difference will lead me to a more precisely priority code.
The code below, was tested at linux and windows SOs and the output wasn't the expected for me.
And here an output example that I didn't expect:
B 0
B 1
A 0
C 0
B 2
B 3
A 1
A 2
A 3
A 4
A -- finished --
B 4
B -- finished --
C 1
C 2
C 3
C 4
C -- finished --