Ah I didn't realize someone else had solved this problem. I will close
mine in favor of yours. I don't quite understand why they're trying to
share globals/statics between threads without some synchronization,
but it's not my battle to deal with. I just want the code to work and
not crash my application.