May 30th – Readers Writer Lock

Late update for the coder tonight. George left so quickly because he wanted to play Mario Kart 8.

Today, I primarily worked towards solving a few perf issues as a palette cleanser before diving back into shields.

I fixed a deadlock scenario with where we weren’t holding a mutex before signaling on a condition variable to shutdown worker threads in our assets system.

While I was in the neighborhood of Assets, I revisited the locking behavior of our assets system. Namely, because Asset reading is nearly entirely reads, and never ever writes except for loading, we didn’t strictly need a single user Mutex to lock it. So I wrote a readers/writer lock. Then I spent the rest of the day debugging, testing for correctness, and exposing bugs elsewhere. Unfortunately, most of these issues were exposed on Windows, so I didn’t stream most of the day. Sorry stream peeps. :(

With the new readers/writer lock we start up noticably faster, which is awesome. There’s still large, low hanging perf issues in the new tile rendering code, which I’m planning on turning my baleful gaze to some point next week, either before or after the shield stuff.

Have a wonderful weekend.