Comment #6 on issue 3498 by rydier: remove:ifAbsent: in linked list leads to interruption/sync problems
http://code.google.com/p/pharo/issues/detail?id=3498

For the record, it was rewritten to accept regular objects as well as links as arguments (in which case a ValueLink for the object is created with add/found and removed with remove)

removeLink:ifAbsent: is exactly the same as remove:ifAbsent: in Squeak

The reason I did not add the ifAbsent: block to the removeLink: call in new remove:ifAbsent: was pure ignorance, I was not aware LinkedLists methods were supposed to be thread-safe, for instance add:after: is not, neither in Pharo nor Squeak.

The version currently in Pharo (without ifAbsent:) is perfectly valid if thread-safeness is not a criterion.



Reply via email to