We also add a multithread example for the C API. This example reproduces a problem reported by Joe Hendrix.