In the following program, what are the possibilities for the ordering of threads? Assuming \"function\" will print thread id which is unique (since here we have only one process
It is like a factory. Got two workers. One needs a bit of coffee and therefore starts a little later at the same task as the other one (well takes time for the kettle). Then that worker is firing on all cylinders but the coffee takes effect. Needs to use the loo. So the one that started earlier finished first but spent more time working. If only that worker had a bucket?!