|
-
Dec 15th, 2005, 07:56 AM
#1
Thread Starter
Junior Member
A kind of CriticalSection in VB.NET ?
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.
-
Dec 15th, 2005, 08:08 AM
#2
Re: A kind of CriticalSection in VB.NET ?
Synclock()
(If I understand your question correctly...
-
Dec 15th, 2005, 08:19 AM
#3
Thread Starter
Junior Member
Re: A kind of CriticalSection in VB.NET ?
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 (?)
Last edited by maitung; Dec 15th, 2005 at 08:36 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|