mit-scheme-devel
[Top][All Lists]
Advanced

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

Re: [MIT-Scheme-devel] non-recursive mutexes


From: Arthur A. Gleckler
Subject: Re: [MIT-Scheme-devel] non-recursive mutexes
Date: Mon, 15 Jun 2015 15:13:32 -0700

On Monday, June 8, 2015, Arthur A. Gleckler <address@hidden> wrote: 

Okay, I know what to do now --basically what you said, but now I have figured out the details.  It should help me with another refactoring I was already planning, too.  I'll report back with the results.

Okay, none of my code uses recursive locks any more, and the code is still clear and simple.  In the process of making the change, I implemented lock upgrade (read-to-write) and better concurrency in general for my graph database, and my logging system is no longer tied to my web server by a shared mutex, so it can be used by other code, too.condition-variable-wait!

Thank you for implementing condition variables, by the way.  That wasn't present when I started, but made the database work much easier.

The biggest hurdle, other than thinking the lock upgrade design through carefully, was spending the good part of an afternoon discovering that `unlock-thread-mutex-and-wait' didn't lock the mutex upon exit, and that I should be using `condition-variable-wait!' instead.  Oops.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]