aniston
asked on
Locking Functions due to Multi-Threading in Visual Basic 6 Possible?
Is theere a way to lock a function (or rather, a selection of code) from being executed by more than 1 thread. I noticed there was a SyncLock command in VB .NET but this does not exist for VB6. Can someone give me the deatails so i can implement the same kind of feature.
If it is of importance i am calling a function that writes out to a file. The problem is that there are many threads running that could call this same function to write out to the file (append to it). Since i could actually be writing to the file before i am interrupted by another thread which causes it to begin writing you can see it can end up being a mess without the lock feature
Thanks
If it is of importance i am calling a function that writes out to a file. The problem is that there are many threads running that could call this same function to write out to the file (append to it). Since i could actually be writing to the file before i am interrupted by another thread which causes it to begin writing you can see it can end up being a mess without the lock feature
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.