Hello everyone, I'm a newbie to vb, is there any data type used to lock resource like CCriticalSection in VC++ ? If no, what's the way to do that ?
I need help on this issue badly, so plz drop a line if you know, thanks.
Printable View
Hello everyone, I'm a newbie to vb, is there any data type used to lock resource like CCriticalSection in VC++ ? If no, what's the way to do that ?
I need help on this issue badly, so plz drop a line if you know, thanks.
Synclock()
(If I understand your question correctly...
I have two threads both checking the state of one boolean var, like this:
In Thread 1: lock
if (bActive = true) then
.....do job 1..
end If
unlock
In Thread 2: lock
if (bActive = true) then
......do job 2..
end If
unlock
so I guess synclock is not suitable because it says it just protect some "code" , which means the two pieces of code ( job1 and job2)must be identical (?)