Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
When working with shared data in threading how do you implement
When working with shared data in threading how do you implement synchronization ?
✍: Guest
There are certain situtations 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 xbr>
'Do something with xbr>
End SyncLock
2007-10-22, 5137👍, 0💬
Popular Posts:
What is the benefit of using #define to declare a constant? Using the #define method of declaring a ...
Can you explain why your project needed XML? Remember XML was meant to exchange data between two ent...
How To Increment Dates by 1? - MySQL FAQs - Introduction to SQL Date and Time Handling If you have a...
What are the core functionalities in XML .NET framework? Can you explain in detail those functionali...
How To Blend a Color Layer to a Image? - PSP Tutorials - Fading Images to Background Colors with PSP...