예제 #1
0
파일: Calls.cs 프로젝트: chadfords/azos
        /// <summary>
        /// Tries to get, return and remove CallSlot instance by its RequestID from the list.
        /// Returns null if CallSlot with such an id does not exist and nothing was removed
        /// </summary>
        public CallSlot TryGetAndRemove(Apps.FID requestID)
        {
            //getBucket() inlined for performance
            var idx    = (requestID.GetHashCode() & CoreConsts.ABS_HASH_MASK) % m_BucketCount;
            var bucket = m_Buckets[idx];

            CallSlot result;

            if (bucket.TryRemove(requestID, out result))
            {
                return(result);
            }

            return(null);
        }
예제 #2
0
 public abstract void Write(Apps.FID value);
예제 #3
0
 public static void Write(WritingStreamer streamer, ulong name, Apps.FID value)
 {
     streamer.Write(name);
     streamer.Write((byte)DataType.FID);
     streamer.Write(value);
 }
예제 #4
0
 public override void Write(Apps.FID value)
 {
     m_Stream.WriteBEUInt64(value.ID);
 }