Hello, let x = Array.make 100 [] let update i n = x.(i) <- n :: x.(i) let read i = x.(i) Consider the following scenario: one thread is `update`ing x, another thread(s) uses only `read`. Is it safe to use these functions without locking on mutex? I.e. is Array.set atomic? What about updating references (:=) ? If I understand correctly these operations require only one cpu instruction to update one machine word and so should be atomic. Taking into account "single-cpu affinity" of ocaml program it should be safe to write such multithreaded code. Is it true? Is it safe to assume that ocamlopt won't skip reads/writes to globally visible memory address using cached value in a register? -- ygrek http://ygrek.org.ua