> condition occurs and that a variable is overwritten at the
> same time as its being written, that it simply uses the
> second value?? I havent seen anyting to suggest this
> anywhere(do you have more info?).
Well, wouldn't it make sense that if you set X to "FOO" at 1:00 PM, and
another thread sets it to "GOO" at one milisecond afterwards, then "GOO"
will be the final value? As it stands, my point was, do you _need_ to
care? Using both Dave's example, and mine, the answer is probably no.
> The problem would seem to me to be more severe as indeed
> macromedia has made the statment that you should avoid this
> by spending time to lock the variable.
I respectfully disagree with their statement. Or, actually, I don't
disagree. If you want to prevent a race condition, use locking. That is
100% true. However, what Dave has said, and I'm agreeing with, is that
you should ask yourself if a race condition is that big of a deal.
> Assuming the worst case (because of lack of evidence to the
> contrary), the variable gets corrupted by this action. I
Define "corrupted". If you REALLY need a value to be written once, then
yes, not locking it will cause "corruption". If it's ok if it gets set
more than once, then there is nothing to worry about.
> would think that the server might be negatively affected by
> such an occurence and indeed might crash. Cf5 would crash
> when its variables became corrupted. So, perhaps it might be
> somewhat important? Of course I'm fairly java clueless so I
> cant make a better guess.
>
This is NOT the case in MX however. You can overwrite values willynilly
and you should not get a crash as you would prior to MX.
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

