freenode/#clasp - IRC Chatlog
Search
5:05:14
beach
Here is an interesting scenario: Suppose some class C is updated. Now, all existing instances of C are obsolete. Suppose that two different threads T1 and T2 use the same obsolete instance (say O) as arguments to perhaps two different generic functions F1 and F2 respectively. Is it possible that the discriminating function of F1 has been updated, but that of F2 has not?
5:05:15
beach
If so, the following could happen: T2 runs the discriminating function, and the result is an accessor that goes directly to some slot, but then T2 is delayed, and T1 executes. The discriminating function of F1 fails, so T1 detects that O is obsolete. It now alters the contents of the slots of O. Now, T2 executes again and accesses the wrong slot of O, perhaps even outside of O.