Instances of gccjit;;context created via gccjit;;context;;acquire() are independent from each other: only one thread may use a given context at once, but multiple threads could each have their own contexts without needing locks.
Contexts created via gccjit;;context;;new_child_context() are related to their parent context. They can be partitioned by their ultimate ancestor into independent “family trees”. Only one thread within a process may use a given “family tree” of such contexts at once, and if you’re using multiple threads you should provide your own locking around entire such context partitions.