all events occur in real time
Please make me understand this:
1. In the above example For every MyThread object we are creating seperate Counter. So how that will cause DATA SHARING problem.
EVERY THREAD IS MANIPULATING THINGS ON ITS OWN COUNTER OBJECT(this)
2. My Understanding is : DATA SHARING PROBLEM CAN BE CAUSED IF RESOURCE IS UNIQUE.
like
2.1 we have Queue of requests to get processed.
There we can have syncrhonized methods for The UNIQUE RequestInterface.
2.2 Data base where we having UNIQUE table on that we fetch and update. records.
Thanks & Regards, T.Srinivasan
SCWCD 1.4(89%), SCJP 5.0(75%)
Thanks & Regards, T.Srinivasan
SCWCD 1.4(89%), SCJP 5.0(75%)
Thanks & Regards, T.Srinivasan
SCWCD 1.4(89%), SCJP 5.0(75%)
Hi Ranchers,
I found my mistakes, though nobody replied to my doubt mentioned in previous mails.
I felt it very bad as no bart-ender or shreiff as visited this thread based on threads.
".toLowerCase();
2. My Understanding is : DATA SHARING PROBLEM CAN BE CAUSED IF RESOURCE IS UNIQUE.
all events occur in real time
Thanks & Regards, T.Srinivasan
SCWCD 1.4(89%), SCJP 5.0(75%)
For me, the following produces the race condition.With synchronisation I get the expected result of 200000. Without I get something between 150000 and 180000.Originally posted by Burkhard Hassel:
If anyone has a running demo that shows that any i++ cause a race condition, I would be curios to see it.
Thanks & Regards, T.Srinivasan
SCWCD 1.4(89%), SCJP 5.0(75%)
Thanks & Regards, T.Srinivasan
SCWCD 1.4(89%), SCJP 5.0(75%)
Originally posted by Manfred Klug:
Howdy Burkhard,
then I would bet you have a single processor machine.
all events occur in real time
Don't get me started about those stupid light bulbs. |