Two questions:
1. Where would be the best place to look for a portable thread-safe CL
hash table?
2. If there is no such thing, I would like to write one and open-
source it for y'all. Is there a good portable non-thread-safe CL hash
table library with which to start? (Idealy with open hashing, as I
wouldn't like to have to lock the whole table every time I access
it...)
mfh
On Aug 1, 12:18 am, "Mark H." <············@gmail.com> wrote:
> Two questions:
>
> 1. Where would be the best place to look for a portable thread-safe CL
> hash table?
>
> 2. If there is no such thing, I would like to write one and open-
> source it for y'all. Is there a good portable non-thread-safe CL hash
> table library with which to start? (Idealy with open hashing, as I
> wouldn't like to have to lock the whole table every time I access
> it...)
>
> mfh
I don't know exactly what do you mean by thread-safe hash table,
but when you are on the way of doing one, I think lock-free hash table
would
be a very useful one. That's the one where you don't need to lock/
unlock with mutexes
when reading or writing to hash table. Compare and swap (CAS)
instruction must be accessible for programmer. I think recent SBCL has
CAS for use by application programmer, don't know about other Lisps.
On Aug 1, 8:13 am, Karol Skocik <············@gmail.com> wrote:
> I don't know exactly what do you mean by thread-safe hash table,
> but when you are on the way of doing one, I think lock-free hash table
> would
> be a very useful one. That's the one where you don't need to lock/
> unlock with mutexes
> when reading or writing to hash table. Compare and swap (CAS)
> instruction must be accessible for programmer. I think recent SBCL has
> CAS for use by application programmer, don't know about other Lisps.
Oh, that's interesting news, I'll check that out -- many thanks!
mfh
On Aug 3, 12:34 am, "Mark H." <············@gmail.com> wrote:
> On Aug 1, 8:13 am, Karol Skocik <············@gmail.com> wrote:
>
> > I don't know exactly what do you mean by thread-safe hash table,
> > but when you are on the way of doing one, I think lock-free hash table
> > would
> > be a very useful one. That's the one where you don't need to lock/
> > unlock with mutexes
> > when reading or writing to hash table. Compare and swap (CAS)
> > instruction must be accessible for programmer. I think recent SBCL has
> > CAS for use by application programmer, don't know about other Lisps.
>
> Oh, that's interesting news, I'll check that out -- many thanks!
>
> mfh
You may find this interesting, it was on erlang's mailing list posted
by Ulf Wiger:
"I just caught Dr. Cliff Click's Google TechTalk on his
lock-free hash table.
http://video.google.com/videoplay?docid=2139967204534450862
The (Java) source is also available
at sourceforge: http://sourceforge.net/projects/high-scale-lib
According to his talk, the algorithm scales well up to 768 cpus"..