Re: Thread-safe caches



Alex Mizrahi wrote:
??>> the worst thing that can happen is that some cached entries are
??>> deleted by another thread, but this may be ok depending on what the
??>> cache is used for. consing can also be a problem depending on the use-
??>> cases.

PC> That would all be fine if setf were guaranteed to be an atomic
PC> operation. Unfortunately, it's not. :(

do you have an example when setf'ing single variable is not an atomic operation?

No. But there doesn't seem to be good documentation in the existing CL implementations which operations are atomic and which are not.

if it was not, implementation would be very easy to crash with simpliest operations. haven't heard anything about such cases

Maybe, but I don't want to bet on that.

Java has exceptionally good documentation about its multi-threading capabilities, and they document cases where one would guess that operations are atomic, but counter-intuitively they are in fact not. So I feel a bit uncomfortable here.


Pascal

--
My website: http://p-cos.net
Common Lisp Document Repository: http://cdr.eurolisp.org
Closer to MOP & ContextL: http://common-lisp.net/project/closer/
.



Relevant Pages

  • Re: Unix admin needs some pointers.
    ... Depending on the system and how critical it is, ... admin, and this is in production for mission critical applications. ... detrimental on VMS systems. ... What little documentation on ...
    (comp.os.vms)
  • Re: detect necessary #includes
    ... you're using changes its implementation so that foo's prototype ... rather than depending on what is guaranteed by the documentation. ... at header files tell which header files are the ones that the ...
    (comp.lang.c)
  • Re: Group Definitions...
    ... Check out the new documentation on technet: ... Depending on what the vendor wants to do, you might be able to get away with ...
    (microsoft.public.windows.server.active_directory)
  • inb & outb woes...
    ... depending on the number of command line args... ... find documentation more in depth than the man page... ...
    (comp.os.linux.development.apps)
  • inb & outb woes...
    ... depending on the number of command line args... ... find documentation more in depth than the man page... ...
    (comp.os.linux.hardware)