Synchronizaiton (Multithreading)
-
I make a software in vb.net which is used multithreading I want to Synchronization of threads so that multiple thread cannot be able to access same code at the same time ................ Thanx!!!!!
-
I make a software in vb.net which is used multithreading I want to Synchronization of threads so that multiple thread cannot be able to access same code at the same time ................ Thanx!!!!!
Without all the description that a question like this needs to be clear, I think you may need to look into using a SyncLock.
' Locks a section of code so only one thread can run it at a time
SyncLock lockObject
' Code
End SyncLockThe documentation on SyncLock can be found here[^]. The hardest part about using it is picking an appropriate object to use for the lock.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
I make a software in vb.net which is used multithreading I want to Synchronization of threads so that multiple thread cannot be able to access same code at the same time ................ Thanx!!!!!