synchronized, #wait, #notify sample - a bit improved.