K2Informatics.Erlnet.GenericQueue.put C# (CSharp) Méthode

put() public méthode

public put ( Object o ) : void
o Object
Résultat void
        public void put(Object o)
        {
            Monitor.Enter(this);
            try
            {
                Bucket b = new Bucket(o);

                if (tail != null)
                {
                    tail.setNext(b);
                    tail = b;
                }
                else
                {
                    // queue was empty but has one element now
                    head = tail = b;
                }
                count++;

                // notify any waiting tasks
                Monitor.Pulse(this);
            }
            finally
            {
                Monitor.Exit(this);
            }
        }