Exemple #1
0
        private static ushort getNewArglessSequenceNumber()
        {
            ushort candidate;

            lock (argLessSequenceNumberManager)
            {
                do
                {
                    candidate = argLessSequenceNumberManager.CheckOutResource();
                } while (Broker.SequenceNumberInUse(candidate));
            }
            return(candidate);
        }
Exemple #2
0
        private static ushort getNewArgumentIdentifiableSequenceNumber(object argument)
        {
            ushort candidate;
            var    argpart = getArgPart(argument);

            lock (argumentIdentifiableSequenceNumberManager)
            {
                do
                {
                    var seqPart = argumentIdentifiableSequenceNumberManager.CheckOutResource();
                    candidate = (ushort)(argpart | seqPart);
                } while (Broker.SequenceNumberInUse(candidate));
            }
            return(candidate);
        }