This section sounds like it's starting to seriously conflate the specifics of a C library with generic usage of FFI. This guide is meant to instruct in general about FFI rather then commenting on a particular use case of one C library. It may be that the C library you're using invokes callbacks on multiple threads, but that is not what usual C code does.

There's a pretty serious amount of code below, and it looks pretty daunting and confusing at first. I don't think that an example like that belongs in the tutorial unless it's used to teach in this guide. Knowledge of this program is assumed at the top of these sections, and you don't learn of it until you reach it all the way down here.

I would recommend rewording these sections to either build up to this program, or to explain a little more in detail about what's going on here. Most C FFI code is probably just interop with a library (like libgit for example) which isn't going to be spawning threads all over the place (nullifying many safety concerns alluded to here).