First of all, I know that lock{}
is synthetic sugar for Monitor
class. (oh, syntactic sugar)
I was playing with simple mul
We have been discussing this with deafsheep and our current idea can be represented as the following schema
Time is running left to right, and 2 threads are represented by two rows.
where
Order of black boxes is always like this, they cannot overlap , and they should always follow each other very closely. Consequently, it becomes very logical, that pluses never overlap, and we should come up precisely to expected sum.
The source of existing error is explored in this question: