Advanced Distributed Systems module at HSLU
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
using System;
|
|
using System.Threading;
|
|
|
|
namespace LostSignals {
|
|
|
|
class AWait : ISynch {
|
|
|
|
private object syncRoot = new object();
|
|
|
|
public void Acquire()
|
|
{
|
|
lock (syncRoot)
|
|
{
|
|
Monitor.Wait(syncRoot);
|
|
}
|
|
}
|
|
|
|
public void Release()
|
|
{
|
|
lock (syncRoot)
|
|
{
|
|
Monitor.Pulse(syncRoot);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|