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.
 
 

28 lines
511 B

using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;
namespace Sync_Ueb03_WaitPool
{
class MyThread
{
private Object synch;
public MyThread(Object synch)
{
this.synch = synch;
}
public void Run()
{
Console.WriteLine("warten...");
lock (synch)
{
Monitor.Wait(synch);
}
Console.WriteLine("...aufgewacht");
}
}
}