IT Placement Papers Microsoft Technologies C#
This category contains C# Interview Questions and Answers |
How do you implement thread synchronization (Object.Wait, Notify,and CriticalSection) in C#?
|
|
|
|
|
You want the lock statement, which is the same as Monitor Enter/Exit:
lock(obj) { // code }
translates to
try {
CriticalSection.Enter(obj);
// code
}
finally
{
CriticalSection.Exit(obj);
}
Only registered users can write comments. Please login or register.
|