summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2012-02-16 10:08:43 +0900
committerMartin Sustrik <sustrik@250bpm.com>2012-02-16 10:08:43 +0900
commit1e01248efc113cc9389f795157400a634730823e (patch)
tree5b321c0540001b6c1f7eab659e4cefec67dfcf96 /doc
parenta55458399f9e54f8384eda174d405ee85d490c45 (diff)
XS_CTX_REENTRANT option added
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/xs_setctxopt.txt16
1 files changed, 16 insertions, 0 deletions
diff --git a/doc/xs_setctxopt.txt b/doc/xs_setctxopt.txt
index be9e654..bc7d018 100644
--- a/doc/xs_setctxopt.txt
+++ b/doc/xs_setctxopt.txt
@@ -34,6 +34,22 @@ Option value type:: int
Option value unit:: sockets
Default value:: 512
+XS_CTX_REENTRANT: Specify whether sockets should be thread-safe
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+If 'XS_CTX_REENTRANT' option is set to 1 it is safe to access single Crossroads
+socket from multiple threads in parallel. If it is set to 0 it can be accessed
+by at most one thread at any single point of time.
+
+Note: By default Crossroads sockets are non-reentrant. If possible, try to use
+the socket from the thread it was created in. If communication between threads
+is needed use inproc transport. Not following this advice can introduce
+scalability problems.
+
+[horizontal]
+Option value type:: int
+Option value unit:: boolean
+Default value:: 0
+
RETURN VALUE
------------
The _xs_setctxopt()_ function shall return zero if successful. Otherwise it