[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mutex-owner

This page is part of the web mail archives of SRFI 18 from before July 7th, 2015. The new archives for SRFI 18 contain all messages, not just those from before July 7th, 2015.



Marc Feeley <feeley@xxxxxxxxxxxxxxxx> writes:

> Mutex-owner is mostly useful for debugging purposes so you can tell
> which thread is holding on to a mutex that never seems to unlock.

I agree.

> Note that there is another implementation problem: Scheme mutexes can
> be unlocked by a different thread than the owner.  Some thread systems
> don't support this (for example POSIX threads).  Fortunately, the
> semantics of mutexes proposed can be implemented with a lower-level
> mutex and a condition variable.  So supporting mutex-owner is not an
> additional overhead.

One could of course remove the ability for a different thread to
unlock the mutex, but I guess the proposed behaviour is more natural
in the kind of interactive development environment which Scheme
systems normally provide.

Thank you.