
27 Aug
2007
27 Aug
'07
5:16 p.m.
On Aug 21, 2007, at 7:28 PM, Zach Laine wrote:
Thanks for the great comments Zach. owns_mutex() or some other suggestion sounds fine to me too.
How about holds_lock? 'owns' doesn't quite ring true with me.
That's the clearest one yet. holds_lock gets my vote.
My problem with lock.owns() is that the grammar suggests the lock owns something, rather then that the lock "is owned" (by the current thread). Furthermore, holds_lock looks like it should be a member function (where this is the current thread), since it uses the same grammar. What about lock.owned() or lock.held()? -- Tack