From 4a2d44af51fe2e8a20628b4a714f4b4ff5dd086c Mon Sep 17 00:00:00 2001
From: Kornel <kornel@geekhood.net>
Date: Fri, 15 Sep 2017 15:14:57 +0100
Subject: [PATCH] Document threading

---
 README.md | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/README.md b/README.md
index 8882748..acc858a 100644
--- a/README.md
+++ b/README.md
@@ -43,3 +43,9 @@ if b"ICC_PROFILE\0" == &app2_marker_data[0..12] {
 There's more in the `examples` directory.
 
 This crate requires Rust 1.18 or later. It's up to date with LCMS 2.8 (should work with 2.6 to 2.9).
+
+## Threads
+
+In LCMS all functions are in 2 flavors: global and `*THR()` functions. In this crate this is represented by having functions with `GlobalContext` and `ThreadContext`. Create profiles, transforms, etc. using `*_context()` constructors to give them their private coontext, which makes them sendable between threads (i.e. they're `Send`).
+
+`Transform` does not implement `Sync`, because LCMS2 has a thread-unsafe cache in the transform.
-- 
GitLab