Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!usenet.blueworldhosting.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!novia!news-out.readnews.com!news-xxxfer.readnews.com!webuse.net!not-for-mail From: "daydreamer" Newsgroups: comp.databases Subject: Re: Thread safe Message-ID: <20130215040746392@webuse.net> References: <20130214035600392@webuse.net> Date: Fri, 15 Feb 2013 04:07:46 GMT X-Newsreader: www.webuse.net X-Complaints-To: abuse@webuse.net NNTP-Posting-Host: 117.208.162.2 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 8bit Lines: 25 X-Received-Bytes: 1963 Xref: csiph.com comp.databases:354 Kees Nuyt wrote: > On Thu, 14 Feb 2013 03:56:00 GMT, "daydreamer" > wrote: > > >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 ? > > No need to reinvent the wheel, it has been done before. > Use SQLite or Berkely DB. > 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