This is a discussion on When working with shared data in threading how do you implement synchronization in a within the ASP and ASP.NET Programming forums, part of the Web Development category; When working with shared data in threading how do you implement synchronization in asp.net?...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| There are certain situations that you need to be careful with when using threads. If two threads (e.g. the main and any worker threads) try to access the same variable at the same time, you'll have a problem. This can be very difficult to debug because they may not always do it at exactly the same time. To avoid the problem, you can lock a variable before accessing it. However, if the two threads lock the same variable at the same time, you'll have a deadlock problem. SyncLock x ' Do something with x End SyncLock |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| UNLIMITED Shared & Reseller Web Hosting!! | iwishost | Web Hosting Deals | 1 | 04-23-2008 01:58 AM |
| Threading in VB.Net Tips | S.Vinothkumar | VB.NET Programming | 16 | 10-30-2007 07:55 AM |
| How to implement threading in VB.Net? | amansundar | VB.NET Programming | 2 | 10-30-2007 07:41 AM |
| Threading in C# .Net 2005 : | a.deeban | C# Programming | 53 | 09-10-2007 07:27 AM |
| How can I implement opaque (abstract) data types in C? | prasath | C and C++ Programming | 1 | 07-30-2007 04:24 AM |