Source/NFX/Collections/CappedSet.cs
/// <summary>
/// Atomic operation which tries to include a member in the set. Returns true if member was included.
/// </summary>
Atomic operation which tries to include a member in the set. Returns true if member was included.
Atomic operation which tries to include a member in the set . Returns true if member was included .
public bool Put(T item)
    {
      var data = getBucket(item);
      lock(data)
      {
        if (data.ContainsKey(item)) return false;
        data.Add(item, App.TimeSource.UTCNow);
        return true;
      }
    }
public bool Put ( T item ) { var data = getBucket ( item ) ; lock ( data ) { if ( data . ContainsKey ( item ) ) return false ; data . Add ( item , App . TimeSource . UTCNow ) ; return true ; } }
Atomic operation which tries to include a member in the set.
Atomic operation which tries to include a member in the set .
item
T