When working with shared data in threading how do you
implement
synchronization ?
There are a somethings 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 doit at
exactly the same
time. To avoid the problem, you can lock a variable before
accessingit.
However, if two threads lock the same variable at the same
time, you'll
have a deadlockproblem.
SyncLock x
'Do something with x
End SyncLock
Full Interview Questions for .NET and SQL Server
http://www
.geocities.com/dotnetinterviews/
Help the community to make job search easier mail your
questions to
jobatyourdoorstep yahoo.co.in
Looking for a onsite job mail your resumes at
jobatyourdoorstep yahoo.co.in
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "C# Developers" group.
To post to this group, send email to CSDevelopers googlegroups.com
To unsubscribe from this group, send email to
CSDevelopers-unsubscribe googlegroups.com
For more options, visit this group at http://gr
oups.google.com/group/CSDevelopers
-~----------~----~----~----~------~----~------~--~---
|