From 42ce2d039dd94048ff1a05dabf0bb86d17ec38f4 Mon Sep 17 00:00:00 2001
From: Pieter Hintjens <ph@imatix.com>
Date: Thu, 3 Mar 2011 09:52:59 +0100
Subject: [PATCH 13/13] Clarified explanation of socket thread safety
 - stronger statement that sockets are not thread safe
 - moved explanation of context thread safety to after that of sockets
 - used terminology of 'full fence' memory barrier, for clarity
 - removed use case of parent-child thread socket migration

Signed-off-by: Pieter Hintjens <ph@imatix.com>
---
 doc/zmq_socket.txt |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/doc/zmq_socket.txt b/doc/zmq_socket.txt
index da41ad7..6df705f 100644
--- a/doc/zmq_socket.txt
+++ b/doc/zmq_socket.txt
@@ -47,17 +47,17 @@ incoming connections *from multiple endpoints* bound to the socket using
 _zmq_bind()_, thus allowing many-to-many relationships.
 
 .Thread safety
+0MQ 'sockets' are _not_ thread safe. Applications MAY create a socket in one
+thread with _zmq_socket()_ and then pass it to a _newly created_ thread as
+part of thread initialization, for example via a structure passed as an
+argument to _pthread_create()_. Applications MUST NOT otherwise use a socket
+from multiple threads except after migrating a socket from one thread to
+another with a "full fence" memory barrier.
+
 A 0MQ 'context' is thread safe and may be shared among as many application
 threads as necessary, without any additional locking required on the part of
 the caller.
 
-Individual 0MQ 'sockets' are _not_ thread safe except in the case where full
-memory barriers are issued when migrating a socket from one thread to another.
-In practice this means applications can create a socket in one thread with
-_zmq_socket()_ and then pass it to a _newly created_ thread as part of thread
-initialization, for example via a structure passed as an argument to
-_pthread_create()_.
-
 .Socket types
 The following sections present the socket types defined by 0MQ, grouped by the
 general _messaging pattern_ which is built from related socket types.
-- 
1.7.0.4

