I enjoyed reading your article beets.io/blog/sqlite-ni -When you get into multi-threaded programs, sometimes debugging becomes a huge headache. Looking at the sqlite source code was really resourceful! I've dealt with similar issues and used semaphores to help coordinate.
