Document thread safety. Closes #196.
diff --git a/man/libzip.mdoc b/man/libzip.mdoc index dec548b..b3ade6b 100644 --- a/man/libzip.mdoc +++ b/man/libzip.mdoc
@@ -29,7 +29,7 @@ .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd July 23, 2020 +.Dd September 15, 2020 .Dt LIBZIP 3 .Os .Sh NAME @@ -62,6 +62,19 @@ .Pp Below there are two sections listing functions: one for how to read from zip archives and one for how to create/modify them. +.Ss THREAD SAFETY +In general, different zip archives opened by +.Nm +are independent of each other and can be used by parallel-running +threads without locking. +If you want to use an archive from multiple threads, you have to +synchronize access to it yourself. +If you use an archive as a source for +.Xr zip_file_add 3 +or +.Xr zip_file_replace 3 , +access to the target archive must be synchronized with access to the +source archive as well. .Sh READING ZIP ARCHIVES .Ss open archive .Bl -bullet -compact