yes. I had considered using a recursive mutex to handle this case. I chose
not to support it because locking multiple things and write to them at
the same time is against the spirit of ACID style databases.

I suppose I could add an assert when a lock is waiting on a mutex owned by
the same thread.

On Fri, Sep 14, 2018 at 8:23 PM Walt Karas <wka...@oath.com.invalid> wrote:

> It looks to me like the AcidPtr docs need a prominent waring that a
> thread should have two instances of these (or AcidCommitPtr) in
> existence at the same time.  If the addresses of the two protected
> objects hashed to the same mutex, wouldn't it cause the thread to lock
> up (due to trying to lock the same mutex twice)?  If this did happen,
> it would be very hard to debug.
>


-- 
Aaron Canary
ATS - Senior Software Engineer

Reply via email to