Hi
I have Download form, that starts Download file thread which uses
interlocked Stop variable to stop thread when Dispose will set Stop to true;
bool nExit;
readonly object exitLock = new object();
bool NormalExit
{
get
{
lock (exitLock)
{
return nExit;
}
}
set
{
lock (exitLock)
{
nExit = value;
}
}
}
When i start another instance od Download form, and experiment with closing
one of them, it seems that one Download instance is acting in some way on
another. It looks like they share Stop variable or somthing. I tried to
figure it out for long time but without any effect. Sometimes when i Dispose
one instance od Download it freezes anouter instances.
I heard that shared variables are only static variables.
And one more:
This download thread is checking for Close variable in Download while loop.
Thanks for any help
PK