Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Thread safe

14 views
Skip to first unread message

daydreamer

unread,
Feb 13, 2013, 10:56:00 PM2/13/13
to
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

Kees Nuyt

unread,
Feb 14, 2013, 4:33:49 PM2/14/13
to
No need to reinvent the wheel, it has been done before.
Use SQLite or Berkely DB.

--
Kees Nuyt

daydreamer

unread,
Feb 14, 2013, 11:07:46 PM2/14/13
to
So much for so called freedom. I must be really free I guess, even if it
is only to reinvent a dumb wheel or be a dumber cog in it. Is that even
a valid expression or one thrown around to dissuade free thought ? I'd
rather do things for myself preferably in my own way. BTW, no input
required, I believe I have figured it out myself. Thanks for nothing.

Posted using www.webuse.net
0 new messages