I am playing around with threads trying to get a better understanding. In this case I am trying cause a variable to be corrupted. Unfortunately, is seems I am not sharing it but I do not understand why aren't I.
my output is:
booThread0 is starting!!
The value of I is 0
My
thread name is booThread0
**** the value of i is: 0 - Name: booThread0
booThread1 is starting!!
The value of I is 0
My thread name is booThread1
**** the value of i is: 0 - Name: booThread1
booThread2 is starting!!
The value of I is 0
My thread name is booThread2
**** the value of i is: 0 - Name: booThread2
booThread3 is starting!!
The value of I is 0
My thread name is booThread3
**** the value of i is: 0 - Name: booThread3
**** the value of i is: 1 - Name: booThread2
**** the value of i is: 1 - Name: booThread3
**** the value of i is: 2 - Name: booThread2
**** the value of i is: 2 - Name: booThread3
**** the value of i is: 1 - Name: booThread0
Any ideas?