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

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