예제 #1
0
파일: Erzeuger.cs 프로젝트: maff/se3ue6
        public void Run()
        {
            this.OnStart("Starting...");
            while (true)
            {
                for (int i = 0; i < this._speed; i++)
                {
                    if (this._storageCheck())
                    {
                        LagerObject obj = new LagerObject();
                        this._push(obj);
                        this.OnCreate("Created new object (" + obj.Id + ")");
                    }
                }

                this.OnSleep("Sleeping for 1000 milliseconds");
                Thread.Sleep(1000);
            }
        }
예제 #2
0
파일: Lager.cs 프로젝트: maff/se3ue6
 protected void Push(LagerObject o)
 {
     lock (this)
     {
         this._storage.Push(o);
     }
 }