List Info

Thread: Interview Questions March 08, 2006




Interview Questions March 08, 2006
user name
2006-03-08 16:26:41
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
jobatyourdoorstepyahoo.co.in
Looking for a onsite job mail your resumes at
jobatyourdoorstepyahoo.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 CSDevelopersgooglegroups.com
To unsubscribe from this group, send email to
CSDevelopers-unsubscribegooglegroups.com
For more options, visit this group at http://gr
oups.google.com/group/CSDevelopers
-~----------~----~----~----~------~----~------~--~---

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )