I am writing a Qt application using the libgit2 API. Certain functions are obviously placed in a background thread:
git_remote_fetch
Others are easily done inline in the foreground thread (i.e., validation within a clicked slot):
git_reference_is_valid_name
However, there are a number of calls for which it is not clear if they should be placed in a background thread or not. I could err on the side of caution, and put everything in a background thread. Or, for convenience, I could put local operations in the foreground unless I run into performance problems (i.e., status). I don't necessarily like the latter option, because if an operation is quick for me, I can't necessarily guarantee it will be quick every time for everyone else.
Are there any sort of threading guidelines or recommendations for libgit2? It doesn't seem to be addressed by the documentation, and information is somewhat sparse.
Update: Specifically, by threading guidelines, I am looking for documentation on recommendations for using specific functions in the foreground or in a background worker task, rather than thread-safeness. For now, I have resorted to placing local operations in a foreground task unless they produce performance problems.