On Monday, June 8, 2015, Arthur A. Gleckler <sch...@speechcode.com> 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.
_______________________________________________
MIT-Scheme-devel mailing list
MIT-Scheme-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/mit-scheme-devel

Reply via email to