Example #1
0
 public static ulong AddDb(DbHandle db)
 {
     ulong handle = (ulong)Interlocked.Increment(ref _handle);
     return _dbs.TryAdd(handle, db) ? handle : 0;
 }
Example #2
0
        public static ulong AddDb(DbHandle db)
        {
            ulong handle = (ulong)Interlocked.Increment(ref _handle);

            return(_dbs.TryAdd(handle, db) ? handle : 0);
        }