On Mon, Jul 3, 2017 at 8:51 AM, Marc Nieper-Wißkirchen <xxxxxx@nieper-wisskirchen.de> wrote:

I agree that a destructive implementation of ‘mapping-search’ will need some kind of locking in the presence of multiple accessing threads to prevent unexpected results; but this is a task an implementation is already facing when implementing ’set-search!’ from SRFI 113 or ‘hash-table-update!’ from SRFI 125.

Conventional wisdom (e.g. Java) is that making containers thread-safe is a mistake: thread safety is an orthogonal concern and should be managed by a wrapper.  Even with the most efficient locks, it's an unnecessary cost most of the time, as even in a multi-threaded system, most containers don't end up being shared.

-- 
 John Cowan          http://vrici.lojban.org/~cowan        xxxxxx@ccil.org
As you read this, I don't want you to feel sorry for me, because,
I believe everyone will die someday.
               --From a Nigerian-type scam spam