I have a tree of recursive small hash tables. A small part of each hash
table is stored in memory and the actual tables, in a file. This is for
a simple experimental hash/trie based database organization.I wish to
make this database thread safe. I intend to do so at the hash table
level, to permit several threads to simultaneously read the hash table,
but only one thread at a time to write or change the hash table. What is
the best way to do accomplish this ? Also what happens if a thread
holding a write
lock on a hash table is abruptly terminated, never releasing that lock,
for other threads to access the table ?
Posted using
www.webuse.net