Browse Source

TODO update (weak_ptr is more clever)

git-svn-id: svn://bind10.isc.org/svn/bind10/branches/trac408@3717 e5f2f494-b856-4b98-b285-d166d9295462
Michal Vaner 14 years ago
parent
commit
1bc7461897
1 changed files with 2 additions and 8 deletions
  1. 2 8
      src/lib/nsas/TODO

+ 2 - 8
src/lib/nsas/TODO

@@ -19,12 +19,6 @@ Long term:
   referenced by any zone entry. This will remove duplicates, keep the RTTs
   longer and will provide access to everything that exists. This is
   tricky, though, because we need to be thread safe. There seems to be
-  solution to:
-  - Reimplement shared_ptr (or subclass it, if it is possible)
-  - Have weak pointers on the hash table
-  - We need to lock the hash table entry when we are about to reach 0
-    so noone gets a reference when we are removing/destroing it. Then
-    we need to check the count once again, someone might have acquired
-    the reference before we got the lock (the chance is small, so the
-    overhead should not matter, but it would crash the application)
+  solution to use weak_ptr inside the hash_table instead of shared_ptr and
+  catch the exception inside get() (and getOrAdd) and delete the dead pointer.
 * Selection algorithm