Re: Thread-safe caches



Pascal Costanza <pc@xxxxxxxxx> wrote on Tue, 06 Nov 2007:
Does anyone know of a straightforward way to make property lists (or
association lists or hashtables) thread-safe in an
implementation-independent way, possibly using some kind of compatibility
layer?

Surely any implementation which offers multiple threads (which is beyond
ANSI CL as it is), also offers semaphores (locks). No?

It would seem that you already need a compatibility layer just for the
multiple threads, and the locks ought to be part of that.

Or is it that your code does NOT assume multiple threads, but your customers
are running in multiple threads themselves, and are requesting that you make
your code thread-safe... I suppose that could be an issue.

I don't think there's a way of dealing with implementation-dependent features
(like threading) without writing implementation-dependent code.

Perhaps you're just hoping that somebody else has already taken responsibility
for this, and you can just import their compatibility layer.

-- Don
_______________________________________________________________________________
Don Geddis http://don.geddis.org/ don@xxxxxxxxxx
Murphy's Law is recursive. Washing your car to make it rain doesn't work.
.