On 2016-05-20 07:49, Era Scarecrow wrote:
Experimented and quickly got what looks like good clean results. Took
your code, ripped out what I didn't want and added in what I did. Simple!
https://dpaste.dzfl.pl/6952fdf463b66
i am most curious about your solution.
why does printAll() has a synchronized block? in case you would call it
before thread_joinAll() i.e. before all threads are terminated?
then again, why is there a synchronized block necessary in printAll() at
all? it is only reading out data, not writing.
(i am still learning the subtleties of multithreading.)
/det