Interview Questions March 08, 2006





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@xxxxxxxxxxx
Looking for a onsite job mail your resumes at
jobatyourdoorstep@xxxxxxxxxxx

.



Relevant Pages

  • Interview Questions Feb 01 2006
    ... at least one thread of execution, and a thread always run in a process ... Full Interview Questions for .NET and SQL Server ... Help the community to make job search easier mail your questions to ...
    (comp.databases.ms-sqlserver)
  • SQL Server Interview Questions Jan 30 2006
    ... What are page splits? ... Full Interview Questions for .NET and SQL Server ... Help the community to make job search easier mail your questions to ...
    (comp.databases.ms-sqlserver)

Loading