On 13.07.2018 17:36, Philip Martin wrote: > Julian Foad <julianf...@apache.org> writes: > >> Philip, can you help clarify this? >>> It's not clear to me from the added paragraph whether the restriction >>> "only access the context from a thread at a time" is imposed by the >>> library implementation or by the way API consumers' code is typically >>> structured. That is: if a client is careful to use mutexes in his >>> batons, or for that matter passes NULL for all batons, would the >>> restriction still apply? > Look at repos_to_wc_copy_single() for example: it stores the original > notify func/baton, sets temporary values, then restores the original > values. I think it is clear that only works if the context is for > single thread, even if the func/batons are NULL.
We've always assumed that our threading model expects reentrant functions but restricted shared structures, such as client context, WC context, RA context etc. But we've not done a very good job at actually documenting that. -- Brane